CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

csPolygonMeshBox Class Reference
[Geometry utilities]

A convenience polygon mesh implementation that represents a cube. More...

#include <polymesh.h>

Inheritance diagram for csPolygonMeshBox:

iPolygonMesh iBase List of all members.

Public Methods

 csPolygonMeshBox (const csBox3 &box)
 Construct a cube polygon mesh.

void SetBox (const csBox3 &box)
 Set the box.

virtual int GetVertexCount ()
 Get the number of vertices for this mesh.

virtual csVector3GetVertices ()
 Get the pointer to the array of vertices.

virtual int GetPolygonCount ()
 Get the number of polygons for this mesh.

virtual csMeshedPolygonGetPolygons ()
 Get the pointer to the array of polygons.

virtual int GetTriangleCount ()
 Get the number of triangles for this mesh.

virtual csTriangleGetTriangles ()
 Get the triangle table for this mesh.

virtual void Lock ()
 Lock the polygon mesh.

virtual void Unlock ()
 Unlock the polygon mesh.

virtual csFlagsGetFlags ()
 Get flags for this polygon mesh.

virtual uint32 GetChangeNumber () const
 When this number changes you know the polygon mesh has changed (deformation has occured) since the last time you got another number from this function.


Detailed Description

A convenience polygon mesh implementation that represents a cube.

Definition at line 207 of file polymesh.h.


Constructor & Destructor Documentation

csPolygonMeshBox::csPolygonMeshBox const csBox3   box [inline]
 

Construct a cube polygon mesh.

Definition at line 221 of file polymesh.h.

References CS_POLYMESH_CLOSED, CS_POLYMESH_CONVEX, CS_POLYMESH_TRIANGLEMESH, csMeshedPolygon::num_vertices, SCF_CONSTRUCT_IBASE, csFlags::SetAll(), and csMeshedPolygon::vertices.


Member Function Documentation

virtual uint32 csPolygonMeshBox::GetChangeNumber   [inline, virtual]
 

When this number changes you know the polygon mesh has changed (deformation has occured) since the last time you got another number from this function.

Implements iPolygonMesh.

Definition at line 295 of file polymesh.h.

virtual csFlags& csPolygonMeshBox::GetFlags   [inline, virtual]
 

Get flags for this polygon mesh.

This is zero or a combination of the following flags:

Note that if neither CS_POLYMESH_CLOSED nor CS_POLYMESH_NOTCLOSED are set then the closed state is not known. Setting both is illegal. Note that if neither CS_POLYMESH_CONVEX nor CS_POLYMESH_NOTCONVEX are set then the convex state is not known. Setting both is illegal.

Implements iPolygonMesh.

Definition at line 294 of file polymesh.h.

virtual int csPolygonMeshBox::GetPolygonCount   [inline, virtual]
 

Get the number of polygons for this mesh.

Implements iPolygonMesh.

Definition at line 288 of file polymesh.h.

virtual csMeshedPolygon* csPolygonMeshBox::GetPolygons   [inline, virtual]
 

Get the pointer to the array of polygons.

Implements iPolygonMesh.

Definition at line 289 of file polymesh.h.

virtual int csPolygonMeshBox::GetTriangleCount   [inline, virtual]
 

Get the number of triangles for this mesh.

Implements iPolygonMesh.

Definition at line 290 of file polymesh.h.

virtual csTriangle* csPolygonMeshBox::GetTriangles   [virtual]
 

Get the triangle table for this mesh.

Implements iPolygonMesh.

virtual int csPolygonMeshBox::GetVertexCount   [inline, virtual]
 

Get the number of vertices for this mesh.

Implements iPolygonMesh.

Definition at line 286 of file polymesh.h.

virtual csVector3* csPolygonMeshBox::GetVertices   [inline, virtual]
 

Get the pointer to the array of vertices.

Implements iPolygonMesh.

Definition at line 287 of file polymesh.h.

virtual void csPolygonMeshBox::Lock   [inline, virtual]
 

Lock the polygon mesh.

This prevents the polygon and triangle data from being cleaned up.

Implements iPolygonMesh.

Definition at line 292 of file polymesh.h.

void csPolygonMeshBox::SetBox const csBox3   box [inline]
 

Set the box.

Definition at line 271 of file polymesh.h.

References csBox3::GetCorner().

virtual void csPolygonMeshBox::Unlock   [inline, virtual]
 

Unlock the polygon mesh.

This allows clean up again.

Implements iPolygonMesh.

Definition at line 293 of file polymesh.h.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.18