BambooIsland: C:/Users/easterbunny/Desktop/Echtzeitgraphik-LU/trunk/src/SceneObject.h Source File

BambooIsland Abgabe 2

- Main Page
- Related Pages
- Classes
- Files

- File List

# C:/Users/easterbunny/Desktop/Echtzeitgraphik-LU/trunk/src/SceneObject.h

    00001 /*
    00002  * header file for SceneObject class
    00003  * written by: christian moellinger <ch.moellinger@gmail.com>
    00004  * 10/2010
    00005  */
    00006
    00007 #ifndef __realtime_sceneobject_header
    00008 #define __realtime_sceneobject_header
    00009
    00010 #include <glm/glm.hpp>
    00011 #include <vector>
    00012
    00013 #include "common_gl.h"
    00014
    00020 class SceneObject
    00021 {
    00022 protected:
    00023     enum RenderState
    00024     {
    00025         Normal, Reflected, LightAsCam
    00026     };
    00027
    00028     RenderState m_tRenderState;
    00029
    00030     glm::mat4 transformMatrix;
    00031     glm::mat4 completeTransformMatrix;
    00032
    00033     std::vector<SceneObject *>  children;
    00034   //  SceneObject       *parent;        ///pointer to the parent object
    00035
    00036     glm::mat4 getFullTransformMatrix();
    00037
    00038     virtual void itlBeforeRender() {};
    00039     virtual void itlRender() {};
    00040     void sendTransformMatrices(bool sendNormalMatrix = true);
    00041     void sendLightPosition();
    00042 public:
    00043     void addChild(SceneObject *obj);
    00044
    00045     void clearChilds();
    00046
    00047     glm::mat4 getTransformMatrix();
    00048
    00049     void setTransformMatrix (glm::mat4 transformMatrix);
    00050
    00051     virtual void render(glm::mat4 parents_transformMatrix, RenderState currentRenderState = Normal);
    00052
    00053     SceneObject();
    00054     virtual ~SceneObject();
    00055 };
    00056
    00057 #endif

All Classes Functions Variables Enumerations Enumerator