CrystalSpace

Public API Reference

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

iPolygonMesh Struct Reference
[Geometry utilities]

This interface reprents a mesh of polygons. More...

#include <polymesh.h>

Inheritance diagram for iPolygonMesh:

iBase csPolygonMesh csPolygonMeshBox List of all members.

Public Methods

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

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

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

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

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

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

virtual void Lock ()=0
 Lock the polygon mesh. More...

virtual void Unlock ()=0
 Unlock the polygon mesh. More...

virtual csFlagsGetFlags ()=0
 Get flags for this polygon mesh. More...

virtual uint32 GetChangeNumber () const=0
 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. More...


Detailed Description

This interface reprents a mesh of polygons.

It is useful to communicate geometry information outside of the engine. One place where this will be useful is for communicating geometry information to the collision detection plugin.
All Crystal Space mesh objects (things, sprites, ...) should implement and/or embed an implementation of this interface.

A polygon mesh has the concept of a vertex buffer and an array of polygons. A triangle mesh is also supported. A mesh object typically only implements either a polygon mesh or a triangle mesh. In that case requesting the other type of mesh will automatically generate the new format. iPolygonMesh can use csPolygonMeshTools::Triangulate() and csPolygonMeshTools::Polygonize() to help with that.

Definition at line 113 of file igeom/polymesh.h.


Member Function Documentation

virtual uint32 iPolygonMesh::GetChangeNumber   const [pure 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.

Implemented in csPolygonMesh.

virtual csFlags& iPolygonMesh::GetFlags   [pure virtual]
 

Get flags for this polygon mesh.

This is zero or more of the following:

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.

Implemented in csPolygonMesh.

virtual int iPolygonMesh::GetPolygonCount   [pure virtual]
 

Get the number of polygons for this mesh.

Implemented in csPolygonMesh.

virtual csMeshedPolygon* iPolygonMesh::GetPolygons   [pure virtual]
 

Get the pointer to the array of polygons.

Implemented in csPolygonMesh.

virtual int iPolygonMesh::GetTriangleCount   [pure virtual]
 

Get the number of triangles for this mesh.

Implemented in csPolygonMesh.

virtual csTriangle* iPolygonMesh::GetTriangles   [pure virtual]
 

Get the triangle table for this mesh.

Implemented in csPolygonMesh.

virtual int iPolygonMesh::GetVertexCount   [pure virtual]
 

Get the number of vertices for this mesh.

Implemented in csPolygonMesh.

virtual csVector3* iPolygonMesh::GetVertices   [pure virtual]
 

Get the pointer to the array of vertices.

Implemented in csPolygonMesh.

virtual void iPolygonMesh::Lock   [pure virtual]
 

Lock the polygon mesh.

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

Implemented in csPolygonMesh.

virtual void iPolygonMesh::Unlock   [pure virtual]
 

Unlock the polygon mesh.

This allows clean up again.

Implemented in csPolygonMesh.


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