|
| Sun (const std::string &name, Scene *scene=0, Model *model=0, Shader *shader=0, const glm::mat4 &modelMatrix=glm::mat4(1)) |
| Construct new sun. More...
|
|
virtual | ~Sun () |
|
void | draw () const |
|
void | reset () |
|
void | update (double deltaT) |
|
void | setShader (Shader *val) |
|
void | drawOmni () const |
|
void | setUpAmbientPass () |
|
void | ambientPass () |
|
void | SVPass () |
|
void | setUpColorTexture () |
|
void | setUpDepthTexture () |
|
GLuint | getDepthTexture () const |
|
| Light (const std::string &name, Scene *scene=0, Model *model=0, const glm::mat4 &modelMatrix=glm::mat4(1)) |
| Construct new light. More...
|
|
virtual | ~Light () |
|
glm::vec3 | getPower () const |
|
glm::vec3 | getDiffuse () const |
|
glm::vec3 | getAmbient () const |
|
glm::vec3 | getSpecular () const |
|
glm::vec3 | getPosition () const |
|
void | setPower (const glm::vec3 &val) |
|
void | setDiffuse (const glm::vec3 &val) |
|
void | setAmbient (const glm::vec3 &val) |
|
void | setSpecular (const glm::vec3 &val) |
|
| SceneObject (std::shared_ptr< SceneObject > &effectParent, const glm::mat4 &modelMatrix=glm::mat4(1)) |
|
| SceneObject (const std::string &name, Scene *scene=0, Model *model=0, const glm::mat4 &modelMatrix=glm::mat4(1)) |
|
virtual | ~SceneObject () |
|
Model * | getModel () const |
|
Shader * | getShader () const |
|
glm::mat4 | getModelMatrix () const |
|
glm::mat4 | getGlobalModelMatrix () const |
|
std::string | getName () const |
|
std::shared_ptr< SceneObject > | getParent () const |
|
void | setAnimationTime (double time) |
|
bool | setAnimation (const Animation &anim) |
|
bool | delChild (size_t idx) |
|
bool | getChild (size_t idx, std::shared_ptr< SceneObject > &child) const |
|
bool | addChild (std::shared_ptr< SceneObject > &child) |
|
bool | remEffect (const std::string &name) |
|
SceneObject * | getEffect (const std::string &name) const |
|
bool | addEffect (const std::string &name, std::unique_ptr< SceneObject > &effect) |
|
bool | doNotRender () |
|
bool | getIsVolSun () |
|
virtual bool | animate (double time) |
|
Implements the sun in the scene together with shadow mapping techniques.
- Author
- Felix
The Sun is a derivation of the Light class which is itself a SceneObject. In addition to the methods from SceneObject, a Sun has methods that use different shadow mapping techniques. The method drawOmni supports Omnidirectional Shadow mapping where every SceneObject is rendered into a cubemap texture. This texture will then be used for the shadow map lookup. In addition, we implemented Shadow volumes and therefore 2 renderpasses are used. The method ambientPass and SVPass compute the shadow volumes using each SceneObject in the 2 seperate renderpasses. For each seperate renderpass, effectobjects are used that are passed onwards to the individual SceneObjects that will be rendered. Framebuffer Objects are used for storing different shadow textures.
- Todo:
- fix documentation