CrystalSpace

Public API Reference

csVertexCompressor Class Reference

A vertex compressor. More...

#include <cstool/vertexcompress.h>

List of all members.

Static Public Member Functions

static csCompressVertexInfoCompress (csArray< csVector3 > &vertices, csArray< csVector2 > &texels, csArray< csVector3 > &normals, csArray< csColor4 > &colors)
 Compress an array of vertices (i.e.
static csCompressVertexInfoCompress (csVector3 *vertices, csVector2 *texels, csVector3 *normals, csColor4 *colors, size_t num_vertices, csVector3 *&new_vertices, csVector2 *&new_texels, csVector3 *&new_normals, csColor4 *&new_colors, size_t &new_count)
 Compress an array of vertices (i.e.


Detailed Description

A vertex compressor.

Definition at line 48 of file vertexcompress.h.


Member Function Documentation

static csCompressVertexInfo* csVertexCompressor::Compress ( csArray< csVector3 > &  vertices,
csArray< csVector2 > &  texels,
csArray< csVector3 > &  normals,
csArray< csColor4 > &  colors 
) [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 csCompressVertexInfo* csVertexCompressor::Compress ( csVector3 vertices,
csVector2 texels,
csVector3 normals,
csColor4 colors,
size_t  num_vertices,
csVector3 *&  new_vertices,
csVector2 *&  new_texels,
csVector3 *&  new_normals,
csColor4 *&  new_colors,
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 by doxygen 1.4.7