Bladeren bron

Moved Light into Render

Thomas Buck 10 jaren geleden
bovenliggende
commit
90351b7492
2 gewijzigde bestanden met toevoegingen van 27 en 40 verwijderingen
  1. 0
    39
      include/Light.h
  2. 27
    1
      include/Render.h

+ 0
- 39
include/Light.h Bestand weergeven

@@ -1,39 +0,0 @@
1
-/*! \file include/Light.h
2
- * \brief The GL light class
3
- *
4
- * \author Mongoose
5
- */
6
-
7
-#ifndef _LIGHT_H_
8
-#define _LIGHT_H_
9
-
10
-#include "MatMath.h"
11
-
12
-/*!
13
- * \brief The GL light class
14
- */
15
-class Light {
16
-public:
17
-    /*!
18
-     * \brief Type a light can be of
19
-     */
20
-    typedef enum {
21
-        typePoint       = 1, //!< Point light
22
-        typeSpot        = 2, //!< Spot light
23
-        typeDirectional = 3  //!< Directional light
24
-    } LightType;
25
-
26
-    // These aren't used anywhere? -- xythobuz
27
-    //float mAmbient[4]; //! Ambient color
28
-    //float mDiffuse[4]; //! Diffuse color
29
-    //float mSpecular[4]; //! Specular color
30
-
31
-    vec4_t mPos; //! Light position in 3 space
32
-    vec3_t mDir; //! Light direction
33
-    float mAtt;
34
-    vec4_t mColor; //! Color of light
35
-    vec_t mCutoff; //! Fade out distance
36
-    LightType mType; //! Type of light
37
-};
38
-
39
-#endif

+ 27
- 1
include/Render.h Bestand weergeven

@@ -13,7 +13,6 @@
13 13
 #include "Vector.h"
14 14
 #include "Matrix.h"
15 15
 #include "ViewVolume.h"
16
-#include "Light.h"
17 16
 #include "World.h"
18 17
 #include "SkeletalModel.h"
19 18
 #include "Mesh.h"
@@ -26,6 +25,33 @@
26 25
 #endif
27 26
 
28 27
 /*!
28
+ * \brief The GL light class
29
+ */
30
+class Light {
31
+public:
32
+    /*!
33
+     * \brief Type a light can be of
34
+     */
35
+    typedef enum {
36
+        typePoint       = 1, //!< Point light
37
+        typeSpot        = 2, //!< Spot light
38
+        typeDirectional = 3  //!< Directional light
39
+    } LightType;
40
+
41
+    // These aren't used anywhere? -- xythobuz
42
+    //float mAmbient[4]; //! Ambient color
43
+    //float mDiffuse[4]; //! Diffuse color
44
+    //float mSpecular[4]; //! Specular color
45
+
46
+    vec4_t mPos; //! Light position in 3 space
47
+    vec3_t mDir; //! Light direction
48
+    float mAtt;
49
+    vec4_t mColor; //! Color of light
50
+    vec_t mCutoff; //! Fade out distance
51
+    LightType mType; //! Type of light
52
+};
53
+
54
+/*!
29 55
  * \brief RenderRoom used by Renderer
30 56
  */
31 57
 class RenderRoom {

Laden…
Annuleren
Opslaan