Scene Object is the base class for all objects in the scene (Camera, Light and Molecule). More...
#include <SceneObject.hpp>
Public Member Functions | |
| SceneObject () | |
| Create a new Scene Object. | |
| virtual | ~SceneObject () |
| Delete the Scene Object. | |
| glm::mat4 | GetModelMatrix () const |
| Returns the current model matrix of the object. | |
| glm::mat4 | GetInverseModelMatrix () const |
| Returns the current inverse model matrix of the object. | |
| virtual void | Reset () |
| Resets the model matrix and inverse model matrix to identity matrix. | |
| virtual void | Translate (float x, float y, float z) |
| Translates the object according to the transform vector x,y,z. | |
| virtual void | RotateX_world (float angle) |
| Rotates the object around world x-axis, angle in degrees. | |
| virtual void | RotateY_world (float angle) |
| Rotates the object around world y-axis, angle in degrees. | |
| virtual void | RotateX (float angle) |
| Rotates the object around it's own x-axis, angle in degrees. | |
| virtual void | RotateY (float angle) |
| Rotates the object around it's own y-axis, angle in degrees. | |
Protected Member Functions | |
| virtual void | Transform (glm::mat4 transformMatrix, glm::mat4 inverseTransformMatrix) |
| Updates the model matrix and inverse model matrix with given transformMatrix (for model matrix) and inverseTransformMatrix (for inverse model matrix). More... | |
| virtual void | Transform_world (glm::mat4 transformMatrix, glm::mat4 inverseTransformMatrix) |
| Updates the model matrix and inverse model matrix with given transformMatrix (for model matrix) and inverseTransformMatrix (for inverse model matrix). More... | |
Protected Attributes | |
| glm::mat4 * | _modelMatrix |
| current model matrix of the object | |
| glm::mat4 * | _inverseModelMatrix |
| current inverse model matrix of the object | |
Scene Object is the base class for all objects in the scene (Camera, Light and Molecule).
A molecule is an object of this class, Camera and Light are derived from this class. This class provides the basic transformation methods needed: Rotation around X and Y axis and Translation.
Definition at line 12 of file SceneObject.hpp.
|
protectedvirtual |
Updates the model matrix and inverse model matrix with given transformMatrix (for model matrix) and inverseTransformMatrix (for inverse model matrix).
Called by the rotation and translation functions. Multiplication Order: modelMatrix = modelMatrix * transformMatrix / inverseModelMatrix = inverseTransformMatrix * inverseModelMatrix.
Definition at line 95 of file SceneObject.cpp.
|
protectedvirtual |
Updates the model matrix and inverse model matrix with given transformMatrix (for model matrix) and inverseTransformMatrix (for inverse model matrix).
Called by the rotation and translation functions. Multiplication Order: modelMatrix = transformMatrix * modelMatrix / inverseModelMatrix = inverseModelMatrix * inverseTransformMatrix.
Definition at line 87 of file SceneObject.cpp.
1.8.3.1