iPolygonMesh Struct Reference
[Geometry utilities]
This interface reprents a mesh of polygons.
More...
#include <polymesh.h>
Inheritance diagram for iPolygonMesh:

Public Methods | |
virtual int | GetVertexCount ()=0 |
Get the number of vertices for this mesh. | |
virtual csVector3 * | GetVertices ()=0 |
Get the pointer to the array of vertices. | |
virtual int | GetPolygonCount ()=0 |
Get the number of polygons for this mesh. | |
virtual csMeshedPolygon * | GetPolygons ()=0 |
Get the pointer to the array of polygons. | |
virtual int | GetTriangleCount ()=0 |
Get the number of triangles for this mesh. | |
virtual csTriangle * | GetTriangles ()=0 |
Get the triangle table for this mesh. | |
virtual void | Lock ()=0 |
Lock the polygon mesh. | |
virtual void | Unlock ()=0 |
Unlock the polygon mesh. | |
virtual csFlags & | GetFlags ()=0 |
Get flags for this polygon mesh. | |
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. |
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.
Main creators of instances implementing this interface:
- Almost all mesh objects have several implementations of this interface.
- iObjectModel::GetPolygonMeshBase()
- iObjectModel::GetPolygonMeshColldet()
- iObjectModel::GetPolygonMeshViscull()
- iObjectModel::GetPolygonMeshShadows()
- Collision detection plugins (iCollideSystem)
- Visibility culler plugins (iVisibilityCuller)
- Shadow stencil plugin
Definition at line 138 of file polymesh.h.
Member Function Documentation
|
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, and csPolygonMeshBox. |
|
Get flags for this polygon mesh. This is zero or a combination of the following flags:
Implemented in csPolygonMesh, and csPolygonMeshBox. |
|
Get the number of polygons for this mesh.
Implemented in csPolygonMesh, and csPolygonMeshBox. |
|
Get the pointer to the array of polygons.
Implemented in csPolygonMesh, and csPolygonMeshBox. |
|
Get the number of triangles for this mesh.
Implemented in csPolygonMesh, and csPolygonMeshBox. |
|
Get the triangle table for this mesh.
Implemented in csPolygonMesh, and csPolygonMeshBox. |
|
Get the number of vertices for this mesh.
Implemented in csPolygonMesh, and csPolygonMeshBox. |
|
Get the pointer to the array of vertices.
Implemented in csPolygonMesh, and csPolygonMeshBox. |
|
Lock the polygon mesh. This prevents the polygon and triangle data from being cleaned up. Implemented in csPolygonMesh, and csPolygonMeshBox. |
|
Unlock the polygon mesh. This allows clean up again. Implemented in csPolygonMesh, and csPolygonMeshBox. |
The documentation for this struct was generated from the following file:
- igeom/polymesh.h
Generated for Crystal Space by doxygen 1.2.18