le3d - LightEngine 3D
A straightforward C++ 3D software engine for real-time graphics
light.h
Go to the documentation of this file.
1 
33 #ifndef LE_LIGHT_H
34 #define LE_LIGHT_H
35 
36 #include "global.h"
37 #include "config.h"
38 
39 #include "color.h"
40 #include "geometry.h"
41 #include "mesh.h"
42 
43 /*****************************************************************************/
48 typedef enum {
53 
54 /*****************************************************************************/
59 class LeLight
60 {
61 public:
62  LeLight();
64 
65  static void black(LeMesh * mesh);
66  void shine(LeMesh * mesh);
67 
71  float rolloff;
73 private:
74  void shinePoint(LeMesh * mesh);
75  void shineDirectional(LeMesh * mesh);
76  void shineAmbient(LeMesh * mesh);
77 
78 public:
79  static void blendColors(LeColor color1, LeColor color2, float factor, LeColor &result);
80 
81 };
82 
83 #endif // LE_LIGHT_H
LeAxis axis
Definition: light.h:69
Definition: light.h:51
float rolloff
Definition: light.h:71
LightEngine 3D: Mesh container and manipulator.
LightEngine 3D: General engine configuration file.
LightEngine 3D: Global helpers and definitions.
Definition: light.h:49
LE_LIGHT_TYPES
Available light models.
Definition: light.h:48
LE_LIGHT_TYPES type
Definition: light.h:68
Definition: light.h:50
LeColor color
Definition: light.h:70
Represent an RGBA color.
Definition: color.h:42
void shine(LeMesh *mesh)
Shine a mesh with the light.
Definition: light.cpp:73
LightEngine 3D: Color implementation.
static void black(LeMesh *mesh)
Clear a mesh light information (shades)
Definition: light.cpp:62
LeLight()
Definition: light.cpp:42
Represent an axis in 3D space.
Definition: geometry_scalar.h:265
LightEngine 3D: Vertex / axis / plane / matrix objects.
Contain and manage a light object.
Definition: light.h:59
Contain and manage a 3D mesh.
Definition: mesh.h:47
static void blendColors(LeColor color1, LeColor color2, float factor, LeColor &result)
Blend two colors together and accumulate the result.
Definition: light.cpp:138