Mesh Class Reference

Represent a polygonal mesh. More...

#include <problem3.h>

Inheritance diagram for Mesh:

Object ReferenceCounted

List of all members.

Public Member Functions

 Mesh ()
 An empty constructor.
virtual ~Mesh ()
 An empty destructor.
virtual int get_position_count () const
 Return the number of vertex positions.
virtual Point3 get_position (int position_index) const
 Return the vertex position with the given index.
virtual int get_normal_count () const
 Return the number of vertex normals.
virtual Vector3 get_normal (int normal_index) const
 Return the vertex normal with the given index.
virtual int get_tex_coord_count () const
 Return the number of vertex texture coordinates.
virtual Uv get_tex_coord (int tex_coord_index) const
 Return the texture coordinate with the given index.
virtual int get_face_count () const
 Return the number of faces.
virtual int get_face_vertex_count (int face_index) const
 Return the number of vertices in the face with the given index.
virtual int get_face_vertex_position_index (int face_index, int vertex_index) const
 Return the index of the position of the vertex specified by vertex_index of the face specfied by face_index.
virtual int get_face_vertex_normal_index (int face_index, int vertex_index) const
 Return the index of the normal of the vertex specified by vertex_index of the face specfied by face_index.
virtual int get_face_vertex_tex_coord_index (int face_index, int vertex_index) const
 Return the index of the texture coordinate of the vertex specified by vertex_index of the face specfied by face_index.
virtual Point3 get_face_vertex_position (int face_index, int vertex_index) const
 Return position of the vertex specified by vertex_index of the face specfied by face_index.
virtual Vector3 get_face_vertex_normal (int face_index, int vertex_index) const
 Return normal of the vertex specified by vertex_index of the face specfied by face_index.
virtual Uv get_face_vertex_tex_coord (int face_index, int vertex_index) const
 Return texture coordinate of the vertex specified by vertex_index of the face specfied by face_index.
virtual void append_position (const Point3 &position)
 Add a new position. The newly added position will have the largest index.
virtual void append_normal (const Vector3 &normal)
 Add a new normal. The newly added normal will have the largest index.
virtual void append_tex_coord (const Uv &tex_coord)
 Add a new texture coordinate. The newly added texture coordinate will have the largest index.
virtual void append_new_face ()
 Create a new face and add it to the collection of faces. The newly added face will have the largest index.
virtual void append_vertex_to_last_face (int position_index, int normal_index, int tex_coord_index)
 Add a vertex, by specifying the indices of its position, normal, and texture coordinate, to the last face added via append_new_face().
virtual void accept (Visitor *visitor)
 Accept a visitor.


Detailed Description

Represent a polygonal mesh.

Constructor & Destructor Documentation

Mesh::Mesh (  ) 

An empty constructor.

virtual Mesh::~Mesh (  )  [virtual]

An empty destructor.


Member Function Documentation

virtual void Mesh::accept ( Visitor visitor  )  [virtual]

Accept a visitor.

Implements Object.

virtual void Mesh::append_new_face (  )  [virtual]

Create a new face and add it to the collection of faces. The newly added face will have the largest index.

virtual void Mesh::append_normal ( const Vector3 normal  )  [virtual]

Add a new normal. The newly added normal will have the largest index.

virtual void Mesh::append_position ( const Point3 position  )  [virtual]

Add a new position. The newly added position will have the largest index.

virtual void Mesh::append_tex_coord ( const Uv tex_coord  )  [virtual]

Add a new texture coordinate. The newly added texture coordinate will have the largest index.

virtual void Mesh::append_vertex_to_last_face ( int  position_index,
int  normal_index,
int  tex_coord_index 
) [virtual]

Add a vertex, by specifying the indices of its position, normal, and texture coordinate, to the last face added via append_new_face().

virtual int Mesh::get_face_count (  )  const [virtual]

Return the number of faces.

virtual int Mesh::get_face_vertex_count ( int  face_index  )  const [virtual]

Return the number of vertices in the face with the given index.

virtual Vector3 Mesh::get_face_vertex_normal ( int  face_index,
int  vertex_index 
) const [virtual]

Return normal of the vertex specified by vertex_index of the face specfied by face_index.

virtual int Mesh::get_face_vertex_normal_index ( int  face_index,
int  vertex_index 
) const [virtual]

Return the index of the normal of the vertex specified by vertex_index of the face specfied by face_index.

virtual Point3 Mesh::get_face_vertex_position ( int  face_index,
int  vertex_index 
) const [virtual]

Return position of the vertex specified by vertex_index of the face specfied by face_index.

virtual int Mesh::get_face_vertex_position_index ( int  face_index,
int  vertex_index 
) const [virtual]

Return the index of the position of the vertex specified by vertex_index of the face specfied by face_index.

virtual Uv Mesh::get_face_vertex_tex_coord ( int  face_index,
int  vertex_index 
) const [virtual]

Return texture coordinate of the vertex specified by vertex_index of the face specfied by face_index.

virtual int Mesh::get_face_vertex_tex_coord_index ( int  face_index,
int  vertex_index 
) const [virtual]

Return the index of the texture coordinate of the vertex specified by vertex_index of the face specfied by face_index.

virtual Vector3 Mesh::get_normal ( int  normal_index  )  const [virtual]

Return the vertex normal with the given index.

virtual int Mesh::get_normal_count (  )  const [virtual]

Return the number of vertex normals.

virtual Point3 Mesh::get_position ( int  position_index  )  const [virtual]

Return the vertex position with the given index.

virtual int Mesh::get_position_count (  )  const [virtual]

Return the number of vertex positions.

virtual Uv Mesh::get_tex_coord ( int  tex_coord_index  )  const [virtual]

Return the texture coordinate with the given index.

virtual int Mesh::get_tex_coord_count (  )  const [virtual]

Return the number of vertex texture coordinates.


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

Generated on Tue Sep 8 02:20:35 2009 for cglib by  doxygen 1.5.9