| ## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# csPolygonMeshBox Class Reference
[Geometry utilities]

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

`#include <csgeom/polymesh.h>`

Inheritance diagram for csPolygonMeshBox:

[legend]
List of all members.

## Public Member Functions
| csPolygonMeshBox (const csBox3 &box)
| Construct a cube 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.
virtual csFlags & | GetFlags ()
| Get flags for this polygon mesh.
virtual int | GetPolygonCount ()
| Get the number of polygons for this mesh.
virtual csMeshedPolygon * | GetPolygons ()
| Get the pointer to the array of polygons.
virtual int | GetTriangleCount ()
| Get the number of triangles for this mesh.
virtual csTriangle * | GetTriangles ()
| Get the triangle table for this mesh.
virtual int | GetVertexCount ()
| Get the number of vertices for this mesh.
virtual csVector3 * | GetVertices ()
| Get the pointer to the array of vertices.
virtual void | Lock ()
| Lock the polygon mesh.
void | SetBox (const csBox3 &box)
| Set the box.
virtual void | Unlock ()
| Unlock the polygon mesh.
virtual | ~csPolygonMeshBox ()

## Detailed Description

A convenience polygon mesh implementation that represents a cube.

Definition at line 212 of file polymesh.h.

## Constructor & Destructor Documentation

csPolygonMeshBox::csPolygonMeshBox | ( | const csBox3 & | box | ) | `[inline]`

Construct a cube polygon mesh.

Definition at line 227 of file polymesh.h.

References CS_POLYMESH_CLOSED, CS_POLYMESH_CONVEX, and CS_POLYMESH_TRIANGLEMESH.

## Member Function Documentation

virtual uint32 csPolygonMeshBox::GetChangeNumber | ( |  | ) | const`[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 297 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:

- CS_POLYMESH_CLOSED: mesh is closed.
- CS_POLYMESH_NOTCLOSED: mesh is not closed.
- CS_POLYMESH_CONVEX: mesh is convex.
- CS_POLYMESH_NOTCONVEX: mesh is not convex.
- CS_POLYMESH_DEFORMABLE: mesh is deformable.
- CS_POLYMESH_TRIANGLEMESH: mesh prefers triangle mesh.

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 296 of file polymesh.h.

virtual int csPolygonMeshBox::GetPolygonCount | ( |  | ) | `[inline, virtual]`

Get the number of polygons for this mesh.

Implements iPolygonMesh.

Definition at line 290 of file polymesh.h.

virtual csMeshedPolygon* csPolygonMeshBox::GetPolygons | ( |  | ) | `[inline, virtual]`

Get the pointer to the array of polygons.

Implements iPolygonMesh.

Definition at line 291 of file polymesh.h.

virtual int csPolygonMeshBox::GetTriangleCount | ( |  | ) | `[inline, virtual]`

Get the number of triangles for this mesh.

Implements iPolygonMesh.

Definition at line 292 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 288 of file polymesh.h.

virtual csVector3* csPolygonMeshBox::GetVertices | ( |  | ) | `[inline, virtual]`

Get the pointer to the array of vertices.

Implements iPolygonMesh.

Definition at line 289 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 294 of file polymesh.h.

void csPolygonMeshBox::SetBox | ( | const csBox3 & | box | ) | `[inline]`

Set the box.

Definition at line 275 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 295 of file polymesh.h.

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

- csgeom/polymesh.h