Osiris Framework  0.1
OVertexColorMesh Class Reference

Mesh class in which colors can be defined for each vertex. More...

#include <OsirisSDK/OVertexColorMesh.h>

Inheritance diagram for OVertexColorMesh:
OMesh

Public Member Functions

 OVertexColorMesh ()
 Class constructor.
 
virtual ~OVertexColorMesh ()
 Class destructor.
 
void addVertexColorData (float r, float g, float b, float alpha)
 Add color definition values for each vertex. More...
 
- Public Member Functions inherited from OMesh
 OMesh (OShaderProgram *program=NULL)
 Class constructor. More...
 
virtual ~OMesh ()
 Class destructor.
 
void setProgram (OShaderProgram *program)
 Sets a new shader program to be used to render the object. More...
 
OShaderProgramgetProgram ()
 Returns the shader program used to render the object. More...
 
int vertexCount () const
 Returns the number of vertices.
 
void addVertexData (float vx, float vy, float vz)
 Add a vertex. More...
 
void addIndexData (GLuint vi, GLuint vj, GLuint vk)
 Define a single triangle by the vertex indices. More...
 
void init ()
 Initializes the mesh buffers and shader attributes. More...
 
void render (OCamera *cam, OMatrixStack *mtx)
 Starts the rendering process for the object. More...
 
void setFaceCulling (bool enabled, CullFace face=CullFace_Undefined, CullFront front=CullFront_Undefined)
 Enables or disables face culling. More...
 

Protected Member Functions

void setupAdditionalVertexArrays ()
 Virtual method to be used by derived classes to set additional vertex data.
 
- Protected Member Functions inherited from OMesh
virtual void setupAdditionalShaderLocations ()
 Virtual method to be used by derived classes to set additional shader parameters.
 
OMeshBuffer< float > * vertexBuffer ()
 Returns the mesh vertex buffer. More...
 
OMeshBuffer< GLuint > * indexBuffer ()
 Returns the mesh index buffer. More...
 

Additional Inherited Members

- Public Types inherited from OMesh
enum  CullFace { CullFace_Undefined =-1, CullFace_Front =GL_FRONT, CullFace_Back =GL_BACK }
 Sets which face will be rendered when face culling is available. More...
 
enum  CullFront { CullFront_Undefined =-1, CullFront_CW =GL_CW, CullFront_CCW =GL_CCW }
 In order to be able to ascertain which face is the front when dealing with face culling, we use the order in which the vertices are laid on each triangle. More...
 

Detailed Description

Mesh class in which colors can be defined for each vertex.

The surface color of each triangle will be an interpolation between the values set for each vertex.

Member Function Documentation

void OVertexColorMesh::addVertexColorData ( float  r,
float  g,
float  b,
float  alpha 
)

Add color definition values for each vertex.

The colors should be set after all vertex where defined.

Parameters
rRed component value.
gGreen component value.
bBlue component value.
alphaAlpha channel component value.

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