ContRap-Libraries
Public Member Functions

crp::GLMeshData Class Reference

Class GLMeshData is a basis class for custom mesh information. More...

#include <glmesh.h>

Public Member Functions

virtual ~GLMeshData ()
 Virtual destructor.
virtual GLMeshDatacopy () const =0
 Copies the internal representation.
virtual const GLVertexget_vertex (int index) const =0
 Returns an indexed vertex of the mesh.
virtual const GLPixelget_texture_coords (int index) const
 Returns indexed texture coordinates.
virtual const GLColorget_color (int index) const
 Returns the indexed color of the mesh.
virtual const GLMeshTriangleget_triangle (int index) const =0
 Returns an indexed triangle of the mesh.
virtual const GLTextureget_texture (int index) const =0
 Returns an indexed texture of the mesh.
virtual int get_size () const =0
 Returns the number of triangles.
virtual bool is_textured () const
 Returns true if the mesh is textured.

Detailed Description

Class GLMeshData is a basis class for custom mesh information.


Constructor & Destructor Documentation

virtual crp::GLMeshData::~GLMeshData ( ) [inline, virtual]

Virtual destructor.


Member Function Documentation

virtual GLMeshData* crp::GLMeshData::copy ( ) const [pure virtual]

Copies the internal representation.

Returns:
Copy of the mesh.
virtual const GLColor* crp::GLMeshData::get_color ( int  index) const [inline, virtual]

Returns the indexed color of the mesh.

If the color value returns a zero pointer, the whole triangle is not drawn.

Parameters:
indexIndex of the color.
Returns:
Color or zero pointer if no such color is defined.
virtual int crp::GLMeshData::get_size ( ) const [pure virtual]

Returns the number of triangles.

Returns:
Number of triangles.
virtual const GLTexture* crp::GLMeshData::get_texture ( int  index) const [pure virtual]

Returns an indexed texture of the mesh.

Parameters:
indexIndex of the texture.
Returns:
Texture of the mesh or a zero pointer if no texture exists.
virtual const GLPixel* crp::GLMeshData::get_texture_coords ( int  index) const [inline, virtual]

Returns indexed texture coordinates.

If the texture coordinates return a zero pointer, the whole triangle is not drawn.

Parameters:
indexIndex of the coordinates.
Returns:
Texture coordinates or zero pointer if no such index is defined.
virtual const GLMeshTriangle* crp::GLMeshData::get_triangle ( int  index) const [pure virtual]

Returns an indexed triangle of the mesh.

Parameters:
indexIndex of the triangle.
Returns:
Triangle of the mesh.
virtual const GLVertex* crp::GLMeshData::get_vertex ( int  index) const [pure virtual]

Returns an indexed vertex of the mesh.

If a vertex returns the zero pointer the whole triangle comprising this vertex is not drawn. This is a way to control drawing of triangle on a vertex level.

Parameters:
indexIndex of the vertex.
Returns:
Vertex of the mesh or zero pointer.
virtual bool crp::GLMeshData::is_textured ( ) const [inline, virtual]

Returns true if the mesh is textured.

Returns:
True if the mesh is textured.

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