SuzanneIsland: An island of Real-time rendering effects!
Public Member Functions
Light Class Reference

The Light class. More...

#include <light.h>

Inheritance diagram for Light:
Geometry SceneObject

Public Member Functions

 Light (const glm::mat4 &modelMatrix_, const std::string &geometryFilePath, glm::vec3 endPos, float cycleDuration_)
 
virtual void update (float timeDelta, bool enableColorChange)
 update the state of the Light More...
 
glm::vec3 getColor () const
 Returns the current color as calculated.
 
- Public Member Functions inherited from Geometry
 Geometry (const glm::mat4 &matrix_, const std::string &filePath)
 
virtual void update (float timeDelta)
 Update the state of the SceneObject. More...
 
virtual void draw (Shader *shader, Camera *camera, bool useFrustumCulling, Texture::FilterType filterType, const glm::mat4 &viewMat)
 draw the SceneObject using given shader
 
glm::mat3 getNormalMatrix () const
 return a the transposed inverse of the modelMatrix. More...
 
glm::vec3 getBBMin ()
 Returns min vertex of axis-aligned bounding box enclosing all surfaces. More...
 
glm::vec3 getBBMax ()
 Returns max vertex of axis-aligned bounding box enclosing all surfaces. More...
 
- Public Member Functions inherited from SceneObject
 SceneObject (const glm::mat4 &modelMatrix_)
 
void applyTransformation (const glm::mat4 &trans_mat, const glm::mat4 &invtrans_mat, Order mult_order)
 Apply a transformation matrix to the current matrix. More...
 
const glm::mat4 & getMatrix () const
 
void setTransform (const glm::mat4 &new_trans_mat)
 Replaces current matrix and sets its inverse. More...
 
const glm::mat4 & getInverseMatrix () const
 
glm::vec3 getLocation () const
 Returns the location of the SceneObject. More...
 
void setLocation (const glm::vec3 &location)
 Set SceneObject's location: rightmost column of the model matrix. More...
 
void rotateX (float radians, Order mult_order)
 Applies an X axis rotation operation to the current transformation. More...
 
void rotateY (float radians, Order mult_order)
 Applies a Y axis rotation operation to the current transformation. More...
 
void rotateZ (float radians, Order mult_order)
 Applies a Z axis rotation operation to the current transformation. More...
 
void rotate (float radians, Order mult_order, const glm::vec3 &rot_axis)
 Applies a rotation around a given vector (= axis) More...
 
void translate (const glm::vec3 &trans_vec, Order mult_order)
 Applies a translation operation to the current transformation. More...
 
void scale (const glm::vec3 &scaling_vec, Order mult_order)
 Applies a scale operation to the current transformation. More...
 
std::string matrixToString (const glm::mat4 &matrix)
 Get a string to visualize the given matrix. More...
 

Additional Inherited Members

- Public Types inherited from SceneObject
enum  Order { LEFT, RIGHT }
 enum specifying matrix multiplication order. More...
 
- Static Public Attributes inherited from Geometry
static int drawnSurfaceCount = 0
 The number of surfaces being drawn.
 

Detailed Description

The Light class.

This stores the light Position and Color, as well as a simple Geometry to visualize the light source object. Color and Position may be set to vary smoothly over time

Member Function Documentation

§ update()

void Light::update ( float  timeDelta,
bool  enableColorChange 
)
virtual

update the state of the Light

Parameters
[in]timeDeltatime passed since the last frame in seconds

The documentation for this class was generated from the following files: