![]() |
Vis 2 Demo
1.0
Technical illustration type real-time rendering of geometry
|
This class produces a textured cube that rotates around the y-axis. More...
Public Member Functions | |
SpinningCubeTextured (glm::mat4 _modelMatrix, Shader *_shader, Texture *_diffuseTexture) | |
Constructor. More... | |
virtual | ~SpinningCubeTextured () |
Destructor. More... | |
virtual void | update (double _deltaT) |
Update function, called every frame. More... | |
virtual void | draw (glm::mat4 &_projectionMatrix) |
Draw function, called every frame. More... | |
![]() | |
GeometricObjectTextured (glm::mat4 _modelMatrix, Shader *_shader, Texture *_diffuse_texture, const float *_positions_Ptr, const unsigned int _pos_size, const float *_normals_Ptr, const unsigned int _norm_size, const float *_uv_Ptr, const unsigned int _uv_size, const unsigned int *_index_Ptr, const unsigned int _ind_size) | |
Constructor. More... | |
virtual | ~GeometricObjectTextured () |
Destructor. More... | |
![]() | |
GeometricObject (glm::mat4 _modelMatrix, Shader *_shader, const float *_positions_Ptr, const unsigned int _pos_size, const float *_normals_Ptr, const unsigned int _norm_size, const unsigned int *_index_Ptr, const unsigned int _ind_size) | |
Constructor. More... | |
virtual | ~GeometricObject () |
Destructor. More... | |
![]() | |
DrawableObject (glm::mat4 &_modelMatrix) | |
Constructor. More... | |
virtual | ~DrawableObject () |
Destructor. More... | |
Private Member Functions | |
SpinningCubeTextured (const SpinningCubeTextured &) | |
Hidden copy-constructor. More... | |
Static Private Attributes | |
static const float | generic_positions [TEXTURED_CUBE_VERTEX_COUNT *3] |
the vertex positions for a generic cube with pivot in (0,0,0) and edge length 2 More... | |
static const float | generic_normlas [TEXTURED_CUBE_VERTEX_COUNT *3] |
the vertex normals for the generic cube with pivot in (0,0,0) and edge length 2 More... | |
static const float | generic_uv [TEXTURED_CUBE_VERTEX_COUNT *2] |
the vertex uv coordinates for the generic cube with pivot in (0,0,0) and edge length 2 More... | |
static const unsigned int | generic_indices [TEXTURED_CUBE_INDEX_COUNT] |
the face indices for the generic cube with pivot in (0,0,0) and edge length 2 More... | |
Additional Inherited Members | |
![]() | |
GLuint | uv_buffer_handle |
handle to the uv buffer object containing the vertex texture coordinates in object space More... | |
Texture * | diffuse_texture_Ptr |
handle to the texture for this object More... | |
This class produces a textured cube that rotates around the y-axis.
This class is well suited for testing the basic setup of an OpenGL application.
Definition at line 14 of file SpinningCubeTextured.h.
SpinningCubeTextured::SpinningCubeTextured | ( | glm::mat4 | _modelMatrix, |
Shader * | _shader, | ||
Texture * | _diffuseTexture | ||
) |
Constructor.
[in] | _modelMatrix | is the model matrix that places the object in the world coordinate system, |
[in] | _shader | is the shader program used by this object. |
[in] | _diffuseTexture | is the pointer to a texture object. The geometry description is contained within the class. |
Definition at line 5 of file SpinningCubeTextured.cpp.
|
virtual |
Destructor.
Definition at line 21 of file SpinningCubeTextured.cpp.
|
private |
Hidden copy-constructor.
|
virtual |
Draw function, called every frame.
Calls its parent's draw function.
Reimplemented from vis2::GeometricObjectTextured.
Definition at line 33 of file SpinningCubeTextured.cpp.
|
virtual |
Update function, called every frame.
[in] | _deltaT | is the duration of the last frame in seconds. The cube rotates around its vertical axis. |
Implements vis2::GeometricObjectTextured.
Definition at line 25 of file SpinningCubeTextured.cpp.
|
staticprivate |
the face indices for the generic cube with pivot in (0,0,0) and edge length 2
Definition at line 46 of file SpinningCubeTextured.h.
|
staticprivate |
the vertex normals for the generic cube with pivot in (0,0,0) and edge length 2
Definition at line 44 of file SpinningCubeTextured.h.
|
staticprivate |
the vertex positions for a generic cube with pivot in (0,0,0) and edge length 2
Definition at line 43 of file SpinningCubeTextured.h.
|
staticprivate |
the vertex uv coordinates for the generic cube with pivot in (0,0,0) and edge length 2
Definition at line 45 of file SpinningCubeTextured.h.