CrystalSpace

Public API Reference

csVector3Array Class Reference
[Geometry utilities]

This is actually the same class as csPoly3D. More...

#include <csgeom/poly3d.h>

Inheritance diagram for csVector3Array:

List of all members.

Public Member Functions

size_t AddVertexSmart (float x, float y, float z)
 Add a vertex but first check if it isn't already present in the array.
size_t AddVertexSmart (const csVector3 &v)
 Add a vertex but first check if it isn't already present in the array.

Static Public Member Functions

static csCompressVertexCompressVertices (csArray< csVector3 > &vertices)
 Compress an array of vertices (i.e.
static csCompressVertexCompressVertices (csVector3 *vertices, size_t num_vertices, csVector3 *&new_vertices, size_t &new_count)
 Compress an array of vertices (i.e.

Detailed Description

This is actually the same class as csPoly3D.

But it has been renamed to make it clear that it is for other uses. It also adds some functionality specific to that use. In particular this class is more used to hold an unordered collection of 3D vectors.

Definition at line 365 of file poly3d.h.


Member Function Documentation

size_t csVector3Array::AddVertexSmart ( float  x,
float  y,
float  z 
)

Add a vertex but first check if it isn't already present in the array.

Return the index that the vertex was added too.

size_t csVector3Array::AddVertexSmart ( const csVector3 v  )  [inline]

Add a vertex but first check if it isn't already present in the array.

Return the index that the vertex was added too.

Definition at line 374 of file poly3d.h.

static csCompressVertex* csVector3Array::CompressVertices ( csArray< csVector3 > &  vertices  )  [static]

Compress an array of vertices (i.e.

remove all duplicated vertices). Returns an array of csCompressVertex which can be used to map from the old index to the new one. The 'vertices' table will be modified with the new compressed vertices. If this function returns 0 there is nothing to do (i.e. no duplicate vertices). Otherwise you have to 'delete[]' the returned array.

static csCompressVertex* csVector3Array::CompressVertices ( csVector3 vertices,
size_t  num_vertices,
csVector3 *&  new_vertices,
size_t &  new_count 
) [static]

Compress an array of vertices (i.e.

remove all duplicated vertices). Returns an array of csCompressVertex which can be used to map from the old index to the new one. 'new_count' will be set to the new number of unique vertices (and 'new_vertices' will be the new vertex table with that size). The size of the returned array is 'num_vertices' though since it has to be indexed with the original vertex array. If this function returns 0 there is nothing to do (i.e. no duplicate vertices). Otherwise you have to 'delete[]' the returned array.


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

Generated for Crystal Space 2.0 by doxygen 1.6.1