![]() |
Public API Reference |
![]() |
A vertex compressor. More...
#include <cstool/vertexcompress.h>
Static Public Member Functions | |
static csCompressVertexInfo * | 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) |
Compress an array of vertices (i.e. | |
static csCompressVertexInfo * | Compress (csArray< csVector3 > &vertices, csArray< csVector2 > &texels, csArray< csVector3 > &normals, csArray< csColor4 > &colors) |
Compress an array of vertices (i.e. | |
static size_t * | Compress (csRef< iRenderBuffer > *buffers, size_t numBuffers, size_t &newCount) |
Compress an array of vertices (i.e. |
A vertex compressor.
Definition at line 51 of file vertexcompress.h.
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.
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 size_t* csVertexCompressor::Compress | ( | csRef< iRenderBuffer > * | buffers, |
size_t | numBuffers, | ||
size_t & | newCount | ||
) | [static] |
Compress an array of vertices (i.e.
remove all duplicated vertices).
buffers | Array of render buffers to compress. All buffers must have the same amount of elements. The pointed-to references will be replaced with the compressed buffers. |
numBuffers | Number of render buffers in buffers. |
newCount | Receives the new vertex count. |