Crystal Space: csTriangleMesh Class Reference (Crystal Space Public API Reference)

| ## Public API Reference

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

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

# csTriangleMesh Class Reference
[Geometry utilities]

A mesh of triangles. More...

`#include <csgeom/trimesh.h>`

List of all members.

## Public Member Functions
void | AddTriangle (int a, int b, int c)
| Add a triangle to the mesh.
void | Clear ()
| Clear the mesh of triangles.
| csTriangleMesh ()
csTriangle & | GetTriangle (int i)
size_t | GetTriangleCount () const
| Query the number of triangles.
const csTriangle * | GetTriangles () const
| Query the array of triangles.
csTriangle * | GetTriangles ()
| Query the array of triangles.
void | SetSize (int count)
| Set the size of the triangle list.
void | SetTriangles (csTriangle const *trigs, int count)
| Set the triangle array. The array is copied.
## Protected Attributes
csDirtyAccessArray< csTriangle > | triangles
| The triangles.

## Detailed Description

A mesh of triangles.

Note that a mesh of triangles is only valid if used in combination with a vertex or edge table. Every triangle is then a set of three indices in that table.

Definition at line 41 of file trimesh.h.

## Member Function Documentation

void csTriangleMesh::AddTriangle | ( | int | a,
|  | int | b,
|  | int | c |
| ) |  |  |

Add a triangle to the mesh.

void csTriangleMesh::Clear | ( |  | ) |

Clear the mesh of triangles.

size_t csTriangleMesh::GetTriangleCount | ( |  | ) | const`[inline]`

Query the number of triangles.

Definition at line 64 of file trimesh.h.

const csTriangle* csTriangleMesh::GetTriangles | ( |  | ) | const`[inline]`

Query the array of triangles.

Definition at line 60 of file trimesh.h.

csTriangle* csTriangleMesh::GetTriangles | ( |  | ) | `[inline]`

Query the array of triangles.

Definition at line 58 of file trimesh.h.

void csTriangleMesh::SetSize | ( | int | count | ) |

Set the size of the triangle list.

void csTriangleMesh::SetTriangles | ( | csTriangle const * | trigs,
|  | int | count |
| ) |  |  |

Set the triangle array. The array is copied.

## Member Data Documentation

csDirtyAccessArray<csTriangle> csTriangleMesh::triangles`[protected]`

The triangles.

Definition at line 45 of file trimesh.h.

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

- csgeom/trimesh.h