csTriangleMeshPointer Class Reference (Crystal Space 2.0 Public API Reference)

| ## Public API Reference

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

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions
csTriangleMeshPointer Class Reference
Geometry utilities

A convenience triangle mesh which takes vertex and triangle pointers from another source. More...

`#include <csgeom/trimesh.h>`

Inheritance diagram for csTriangleMeshPointer:

List of all members.

## Public Member Functions
| csTriangleMeshPointer (csVector3 *vertices, size_t num_vertices, csTriangle *triangles, size_t num_triangles)
| Construct a triangle mesh.
virtual uint32 | GetChangeNumber () const
| When this number changes you know the triangle mesh has changed (deformation has occured) since the last time you got another number from this function.
virtual csFlags & | GetFlags ()
| Get flags for this triangle mesh.
virtual size_t | GetTriangleCount ()
| Get the number of triangles for this mesh.
virtual csTriangle * | GetTriangles ()
| Get the triangle table for this mesh.
virtual size_t | 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 triangle mesh.
virtual void | Unlock ()
| Unlock the triangle mesh.

## Detailed Description

A convenience triangle mesh which takes vertex and triangle pointers from another source.

Take care of object life time when using this class; i.e. make sure the real owner of the vertex and triangle data is not destroyed at a time when this class is still in use.

Definition at line 236 of file trimesh.h.

## Constructor & Destructor Documentation

csTriangleMeshPointer::csTriangleMeshPointer | ( | csVector3 * | vertices,
|  | size_t | num_vertices,
|  | csTriangle * | triangles,
|  | size_t | num_triangles
| ) |  | `[inline]`

Construct a triangle mesh.

Definition at line 251 of file trimesh.h.

## Member Function Documentation

virtual uint32 csTriangleMeshPointer::GetChangeNumber | ( |  | ) | const`[inline, virtual]`

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

Implements iTriangleMesh.

Definition at line 273 of file trimesh.h.

virtual csFlags& csTriangleMeshPointer::GetFlags | ( |  | ) | `[inline, virtual]`

Get flags for this triangle mesh.

This is zero or a combination of the following flags:

- CS_TRIMESH_CLOSED: mesh is closed.
- CS_TRIMESH_NOTCLOSED: mesh is not closed.
- CS_TRIMESH_CONVEX: mesh is convex.
- CS_TRIMESH_NOTCONVEX: mesh is not convex.
- CS_TRIMESH_DEFORMABLE: mesh is deformable.

Note that if neither CS_TRIMESH_CLOSED nor CS_TRIMESH_NOTCLOSED are set then the closed state is not known. Setting both is illegal. Note that if neither CS_TRIMESH_CONVEX nor CS_TRIMESH_NOTCONVEX are set then the convex state is not known. Setting both is illegal.

Implements iTriangleMesh.

Definition at line 272 of file trimesh.h.

virtual size_t csTriangleMeshPointer::GetTriangleCount | ( |  | ) | `[inline, virtual]`

Get the number of triangles for this mesh.

Implements iTriangleMesh.

Definition at line 268 of file trimesh.h.

virtual csTriangle* csTriangleMeshPointer::GetTriangles | ( |  | ) | `[inline, virtual]`

Get the triangle table for this mesh.

Implements iTriangleMesh.

Definition at line 269 of file trimesh.h.

virtual size_t csTriangleMeshPointer::GetVertexCount | ( |  | ) | `[inline, virtual]`

Get the number of vertices for this mesh.

Implements iTriangleMesh.

Definition at line 266 of file trimesh.h.

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

Get the pointer to the array of vertices.

Implements iTriangleMesh.

Definition at line 267 of file trimesh.h.

virtual void csTriangleMeshPointer::Lock | ( |  | ) | `[inline, virtual]`

Lock the triangle mesh.

This prevents the triangle data from being cleaned up.

Implements iTriangleMesh.

Definition at line 270 of file trimesh.h.

virtual void csTriangleMeshPointer::Unlock | ( |  | ) | `[inline, virtual]`

Unlock the triangle mesh.

This allows clean up again.

Implements iTriangleMesh.

Definition at line 271 of file trimesh.h.

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

- csgeom/trimesh.h