]> git.leopard-lacewing.eu Git - cgue_weave.git/commitdiff
merged Lights
authorPeter Schaefer <schaeferpm@gmail.com>
Tue, 5 Apr 2016 18:56:30 +0000 (20:56 +0200)
committerPeter Schaefer <schaeferpm@gmail.com>
Tue, 5 Apr 2016 18:56:30 +0000 (20:56 +0200)
.gitignore
Weave/Graphix/PointLight.cpp [new file with mode: 0644]
Weave/Graphix/PointLight.h [new file with mode: 0644]
Weave/Weave.vcxproj
Weave/Weave.vcxproj.filters
res/bulletMAKE/src/BulletCollision/BulletCollision.dir/Debug/BulletCollision.log

index 4f15c4c2a5cb74e512b8e69018f42ef4522e118b..d596d2774a0ce840825955f2819db360119b2163 100644 (file)
@@ -7,6 +7,7 @@
 build-*
 *.opendb
 *.db
+*.log
 
 *.exe
 *.pdb
diff --git a/Weave/Graphix/PointLight.cpp b/Weave/Graphix/PointLight.cpp
new file mode 100644 (file)
index 0000000..634f6bb
--- /dev/null
@@ -0,0 +1,55 @@
+#include "PointLight.h"
+#include "Graphix.h"
+
+
+
+
+struct CameraDirection
+{
+       GLenum CubemapFace;
+       vec3 Target;
+       vec3 Up;
+};
+
+CameraDirection gCameraDirections[6] =
+{
+       {GL_TEXTURE_CUBE_MAP_POSITIVE_X, vec3(1.0f, 0.0f, 0.0f), vec3(0.0f, -1.0f, 0.0f)},
+       {GL_TEXTURE_CUBE_MAP_NEGATIVE_X, vec3(-1.0f, 0.0f, 0.0f), vec3(0.0f, -1.0f, 0.0f)},
+       {GL_TEXTURE_CUBE_MAP_POSITIVE_Y, vec3(0.0f, 1.0f, 0.0f), vec3(0.0f, 0.0f, -1.0f)},
+       {GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, vec3(0.0f, -1.0f, 0.0f), vec3(0.0f, 0.0f, 1.0f)},
+       {GL_TEXTURE_CUBE_MAP_POSITIVE_Z, vec3(0.0f, 0.0f, 1.0f), vec3(0.0f, -1.0f, 0.0f)},
+       {GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, vec3(0.0f, 0.0f, -1.0f), vec3(0.0f, -1.0f, 0.0f)}
+};
+
+
+
+
+
+PointLight::PointLight(vec3& _position, vec3& _color) : 
+       position(_position),
+       color(_color),
+       active(true)
+{
+       
+}
+
+PointLight::~PointLight()
+{
+
+}
+
+void PointLight::changeLight(vec3& _position, vec3& _color)
+{
+       position = _position;
+       color = _color;
+}
+
+void PointLight::turnOn()
+{
+       active = true;
+}
+
+void PointLight::turnOff()
+{
+       active = false;
+}
\ No newline at end of file
diff --git a/Weave/Graphix/PointLight.h b/Weave/Graphix/PointLight.h
new file mode 100644 (file)
index 0000000..17355a0
--- /dev/null
@@ -0,0 +1,20 @@
+#pragma once
+
+#include "../GLM.h"
+
+class PointLight
+{
+public:
+       PointLight(vec3& _position, vec3& _color);
+
+       virtual ~PointLight();
+
+       void changeLight(vec3& _position, vec3& _color);
+       void turnOn();
+       void turnOff();
+
+protected:
+       vec3 position;
+       vec3 color;
+       bool active;
+};
\ No newline at end of file
index 722b3c66bacaa866c11de6509409416444303971..25db5a9300d265fed2ecec4d9608fbe567cfeceb 100644 (file)
     <ClCompile Include="Graphix\Model\IMesh.cpp" />\r
     <ClCompile Include="Graphix\Model\IMetaMesh.cpp" />\r
     <ClCompile Include="Graphix\Model\Model.cpp" />\r
-    <ClCompile Include="Graphix\Model\SkyBox.cpp" />\r
+    <ClCompile Include="Graphix\Model\SkyBox.cpp" />
+    <ClCompile Include="Graphix\PointLight.cpp" />
     <ClCompile Include="Scene\EventBox.cpp" />\r
     <ClCompile Include="Scene\Level.cpp" />\r
     <ClCompile Include="Scene\Marvin.cpp" />\r
     <ClInclude Include="Graphix\Model\IMesh.h" />\r
     <ClInclude Include="Graphix\Model\IMetaMesh.h" />\r
     <ClInclude Include="Graphix\Model\Model.h" />\r
-    <ClInclude Include="Graphix\Model\SkyBox.h" />\r
+    <ClInclude Include="Graphix\Model\SkyBox.h" />
+    <ClInclude Include="Graphix\PointLight.h" />
     <ClInclude Include="Scene.h" />\r
     <ClInclude Include="Scene\EventBox.h" />\r
     <ClInclude Include="Scene\Level.h" />\r
index 09a7867eabb96dd3ad8de59750a5b65e18c90672..fe9d56b73bec6d99fd999a54079f051bd813f51c 100644 (file)
@@ -87,6 +87,9 @@
     <ClCompile Include="Graphix\Model\IAnimMesh.cpp">\r
       <Filter>Source Files</Filter>\r
     </ClCompile>\r
+    <ClCompile Include="Graphix\PointLight.cpp">\r
+      <Filter>Source Files</Filter>\r
+    </ClCompile>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ClInclude Include="Fps.h">\r
     <ClInclude Include="Graphix\Debug.h">\r
       <Filter>Header Files</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="Graphix\PointLight.h">\r
+      <Filter>Header Files</Filter>\r
+    </ClInclude>\r
   </ItemGroup>\r
 </Project>
\ No newline at end of file
index 063e1f823eb5197793774355b2e9fdfdfa34b995..ae265fb39fb7ccee8d707855fbdc806b4a5d3de9 100644 (file)
@@ -1,2 +1 @@
-btBroadphaseProxy.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library\r
-  BulletCollision.vcxproj -> C:\Daten\Visual Studio 2015\Projects\CGUE2015_Weave\res\bulletMAKE\lib\Debug\BulletCollision_Debug.lib\r
+  BulletCollision.vcxproj -> C:\Daten\Visual Studio 2015\Projects\CGUE2015_Weave\res\bulletMAKE\lib\Debug\BulletCollision_Debug.lib\r