Public Member Functions | Protected Attributes

lssr::BaseMesh< VertexT, NormalT > Class Template Reference

Abstract interface class for dynamic triangle meshes. The surface reconstruction algorithm can handle all all data structures that allow sequential insertion all of indexed triangles. More...

#include <BaseMesh.hpp>

Inheritance diagram for lssr::BaseMesh< VertexT, NormalT >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void addVertex (VertexT v)=0
 This method should be called every time a new vertex is created.
virtual void addNormal (NormalT n)=0
 This method should be called every time a new vertex is created to ensure that vertex and normal buffer always have the same size.
virtual void addTriangle (uint a, uint b, uint c)=0
 Insert a new triangle into the mesh.
virtual void finalize ()=0
 Finalizes a mesh, i.e. converts the template based buffers to OpenGL compatible buffers.
virtual void save (string filename)
 Save the mesh to the given file.

Protected Attributes

bool m_finalized
 True if mesh is finalized.
float * m_vertexBuffer
 The mesh's vertex buffer.
float * m_normalBuffer
 The vertex normals.
float * m_colorBuffer
 The vertex colors.
uint * m_indexBuffer
 The mesh's index buffer.
uint m_nVertices
 The number of vertices in the mesh.
uint m_nFaces
 The number of face in the mesh.

Detailed Description

template<typename VertexT, typename NormalT>
class lssr::BaseMesh< VertexT, NormalT >

Abstract interface class for dynamic triangle meshes. The surface reconstruction algorithm can handle all all data structures that allow sequential insertion all of indexed triangles.

Definition at line 20 of file BaseMesh.hpp.


Member Function Documentation

template<typename VertexT, typename NormalT>
virtual void lssr::BaseMesh< VertexT, NormalT >::addNormal ( NormalT  n  )  [pure virtual]

This method should be called every time a new vertex is created to ensure that vertex and normal buffer always have the same size.

Parameters:
n A supported vertex type. All used vertex types must support []-access.

Implemented in lssr::HalfEdgeMesh< VertexT, NormalT >, and lssr::TriangleMesh< VertexT, NormalT >.

template<typename VertexT, typename NormalT>
virtual void lssr::BaseMesh< VertexT, NormalT >::addTriangle ( uint  a,
uint  b,
uint  c 
) [pure virtual]

Insert a new triangle into the mesh.

Parameters:
a The first vertex of the triangle
b The second vertex of the triangle
c The third vertex of the triangle

Implemented in lssr::HalfEdgeMesh< VertexT, NormalT >, and lssr::TriangleMesh< VertexT, NormalT >.

template<typename VertexT, typename NormalT>
virtual void lssr::BaseMesh< VertexT, NormalT >::addVertex ( VertexT  v  )  [pure virtual]

This method should be called every time a new vertex is created.

Parameters:
v A supported vertex type. All used vertex types must support []-access.

Implemented in lssr::HalfEdgeMesh< VertexT, NormalT >, and lssr::TriangleMesh< VertexT, NormalT >.

template<typename VertexT, typename NormalT>
virtual void lssr::BaseMesh< VertexT, NormalT >::finalize (  )  [pure virtual]

Finalizes a mesh, i.e. converts the template based buffers to OpenGL compatible buffers.

Implemented in lssr::HalfEdgeMesh< VertexT, NormalT >, and lssr::TriangleMesh< VertexT, NormalT >.

template<typename VertexT, typename NormalT>
virtual void lssr::BaseMesh< VertexT, NormalT >::save ( string  filename  )  [virtual]

Save the mesh to the given file.


Member Data Documentation

template<typename VertexT, typename NormalT>
float* lssr::BaseMesh< VertexT, NormalT >::m_colorBuffer [protected]

The vertex colors.

Definition at line 75 of file BaseMesh.hpp.

template<typename VertexT, typename NormalT>
bool lssr::BaseMesh< VertexT, NormalT >::m_finalized [protected]

True if mesh is finalized.

Definition at line 66 of file BaseMesh.hpp.

template<typename VertexT, typename NormalT>
uint* lssr::BaseMesh< VertexT, NormalT >::m_indexBuffer [protected]

The mesh's index buffer.

Definition at line 78 of file BaseMesh.hpp.

template<typename VertexT, typename NormalT>
uint lssr::BaseMesh< VertexT, NormalT >::m_nFaces [protected]

The number of face in the mesh.

Definition at line 84 of file BaseMesh.hpp.

template<typename VertexT, typename NormalT>
float* lssr::BaseMesh< VertexT, NormalT >::m_normalBuffer [protected]

The vertex normals.

Reimplemented in lssr::TriangleMesh< VertexT, NormalT >.

Definition at line 72 of file BaseMesh.hpp.

template<typename VertexT, typename NormalT>
uint lssr::BaseMesh< VertexT, NormalT >::m_nVertices [protected]

The number of vertices in the mesh.

Definition at line 81 of file BaseMesh.hpp.

template<typename VertexT, typename NormalT>
float* lssr::BaseMesh< VertexT, NormalT >::m_vertexBuffer [protected]

The mesh's vertex buffer.

Definition at line 69 of file BaseMesh.hpp.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Defines