Developer Documentation
|
Classes | |
struct | AdjacencyList |
struct | Subset |
struct | VertexElementInput |
struct | VertexSplitter |
struct | WeldList |
struct | WeldListEntry |
Public Member Functions | |
MeshCompiler (const VertexDeclaration &_decl) | |
void | getIndexAdjBuffer_MT (void *_dst, const int _borderIndex=-1) |
Multi-threaded version of getIndexAdjBuffer. More... | |
void | dbgdump (const char *_filename) const |
dump mesh info to text file | |
void | dbgdumpObj (const char *_filename) const |
dump mesh in wavefront obj format | |
void | dbgdumpInputBin (const char *_filename, bool _seperateFiles=false) const |
dump input mesh to binary file format | |
void | dbgdumpInputObj (const char *_filename) const |
dump input mesh to wavefront obj format | |
void | dbgdumpAdjList (const char *_filename) const |
dump adjacency list to text file | |
bool | dbgVerify (const char *_filename) const |
test correctness of input <-> output id mappings, unshared per face vertex.. logs errors in file | |
std::string | vertexToString (const void *v) const |
interpret vertex data according declaration and write to string | |
size_t | getMemoryUsage (bool _printConsole=true) const |
std::string | checkInputData () const |
check for errors in input data | |
Vertex Data Input | |
void | setVertices (int _num, const void *_data, int _stride=0, bool _internalCopy=false, GLuint _fmt=0, int _elementSize=-1) |
void | setNormals (int _num, const void *_data, int _stride=0, bool _internalCopy=false, GLuint _fmt=0, int _elementSize=-1) |
void | setTexCoords (int _num, const void *_data, int _stride=0, bool _internalCopy=false, GLuint _fmt=0, int _elementSize=-1) |
void | setAttribVec (int _attrIdx, int _num, const void *_data, int _stride=0, bool _internalCopy=false, GLuint _fmt=0, int _elementSize=-1) |
void | setAttrib (int _attrIdx, int _v, const void *_data) |
int | getNumInputAttributes (int _attrIdx) const |
Flexible Face Data Input | |
void | setFaceInput (MeshCompilerFaceInput *_faceInput) |
Default Face Data Input | |
void | setNumFaces (const int _numFaces, const int _numIndices) |
Set number of faces and indices if known by user. More... | |
void | setIndexBufferInterleaved (int _numTris, int _indexSize, const void *_indices) |
Set index buffer for a triangle mesh. More... | |
void | setFaceVerts (int _i, int _v0, int _v1, int _v2) |
Set vertex ids per triangle. More... | |
void | setFaceVerts (int _i, int _faceSize, int *_v) |
Set vertex ids per face. More... | |
void | setFaceNormals (int _i, int _v0, int _v1, int _v2) |
Set normal ids per triangle. More... | |
void | setFaceNormals (int _i, int _faceSize, int *_v) |
Set normal ids per face. More... | |
void | setFaceTexCoords (int _i, int _v0, int _v1, int _v2) |
Set texcoord ids per triangle. More... | |
void | setFaceTexCoords (int _i, int _faceSize, int *_v) |
Set texcoord ids per face. More... | |
void | setFaceAttrib (int _i, int _v0, int _v1, int _v2, int _attrID) |
Set attribute ids per triangle. More... | |
void | setFaceAttrib (int _i, int _faceSize, int *_v, int _attrID) |
Set attribute ids per face. More... | |
Face Grouping and Subsets | |
void | setFaceGroup (int _i, short _groupID) |
Specify face groups. More... | |
int | findGroupSubset (int _groupID) |
get subset ID of a group More... | |
int | getFaceGroup (int _faceID) const |
Get Face Group of the given face. More... | |
int | getTriGroup (int _triID) const |
Get Group Id of the triangle. More... | |
int | getNumSubsets () const |
Get the number of subsets. More... | |
const Subset * | getSubset (int _i) const |
get a specific subset More... | |
Mesh Compilation | |
void | build (bool _weldVertices=false, bool _optimizeVCache=true, bool _needPerFaceAttribute=false, bool _keepIsolatedVertices=false) |
Build vertex + index buffer. More... | |
int | getNumVertices () const |
void | setProvokingVertex (int _v) |
int | getProvokingVertex () const |
void | getVertexBuffer (void *_dst, const int _offset=0, const int _range=-1) |
Get vertex buffer ready for rendering. More... | |
const int * | getIndexBuffer () const |
void | getIndexAdjBuffer (void *_dst, const int _borderIndex=-1) |
Get index buffer with adjacency information ready for rendering. More... | |
void | getIndexAdjBuffer_BruteForce (void *_dst, const int _borderIndex=-1) |
Slow brute-force version of getIndexAdjBuffer. More... | |
int | getNumTriangles () const |
int | getNumFaces () const |
int | getFaceSize (const int _i) const |
Get size of input face. More... | |
const VertexDeclaration * | getVertexDeclaration () const |
void | getVertex (int _id, void *_out) const |
int | getIndex (int _i) const |
Input/Output ID mapping | |
int | mapToOriginalVertexID (const int _i, int &_faceID, int &_cornerID) const |
int | mapToOriginalFaceID (const int _triID) const |
const int * | mapToOriginalFaceIDPtr () const |
int | mapToDrawVertexID (const int _faceID, const int _cornerID) const |
int | mapToDrawTriID (const int _faceID, const int _k=0, int *_numTrisOut=0) const |
Triangulation properties | |
bool | isTriangleMesh () const |
bool | isFaceEdge (const int _triID, const int _edge) const |
Private Member Functions | |
void | computeAdjacency (bool _forceRecompute=false) |
void | splitVertices () |
void | getInputFaceVertex (const int _face, const int _corner, int *_out) const |
void | getInputFaceVertex_Welded (const int _face, const int _corner, int *_out) const |
void | getInputFaceVertexData (const int _face, const int _corner, void *_out) const |
int | getInputIndex (const int &_face, const int &_corner, const int &_attrId) const |
int | getAdjVertexFaceCount (int _vertexID) const |
int | getAdjVertexFace (int _vertexID, int _k) const |
int | getInputIndexSplit (const int _face, const int _corner) const |
void | setInputIndexSplit (const int _face, const int _corner, const int _val) |
int | mapTriToInputFace (const int _tri) const |
int | getInputIndexOffset (const int _face, const int _corner) const |
int | getInputFaceOffset (const int _face) const |
void | prepareData () |
build() preparation | |
void | findIsolatedVertices () |
void | forceUnsharedFaceVertex () |
void | weldVertices () |
void | fixWeldMap () |
void | triangulate () |
void | resolveTriangulation () |
void | sortFacesByGroup () |
void | optimize () |
void | createVertexMap (bool _keepIsolatedVerts) |
void | createFaceMap () |
Private Attributes | |
VertexElementInput | input_ [16] |
int | inputIDPos_ |
int | inputIDNorm_ |
int | inputIDTexC_ |
int | numAttributes_ |
VertexDeclaration | decl_ |
int | numFaces_ |
int | numIndices_ |
std::vector< int > | faceStart_ |
std::vector< int > | faceSize_ |
std::vector< int > | faceData_ |
size_t | maxFaceSize_ |
bool | constantFaceSize_ |
std::vector< short > | faceGroupIDs_ |
int | curFaceInputPos_ |
MeshCompilerFaceInput * | faceInput_ |
bool | deleteFaceInputeData_ |
std::vector< int > | faceBufSplit_ |
std::vector< int > | faceSortMap_ |
int | provokingVertex_ |
bool | provokingVertexSetByUser_ |
int | numTris_ |
std::vector< int > | triIndexBuffer_ |
std::vector< int > | isolatedVertices_ |
int | numSubsets_ |
std::vector< Subset > | subsets_ |
std::map< int, int > | subsetIDMap_ |
AdjacencyList | adjacencyVert_ |
MeshCompilerVertexCompare * | vertexCompare_ |
std::vector< int > | vertexWeldMapFace_ |
std::vector< int > | vertexWeldMapCorner_ |
VertexSplitter * | splitter_ |
std::vector< int > | triToSortFaceMap_ |
maps from triangle ID to sorted face ID | |
std::vector< int > | triOptMap_ |
maps from optimized tri ID to unoptimized tri ID | |
std::vector< int > | vertexMapFace_ |
vertex index in vbo -> input (face id, corner id) pair , also inverse of faceBufSplit_ | |
std::vector< int > | vertexMapCorner_ |
std::vector< int > | faceToTriMap_ |
input face index -> output tri index | |
std::vector< int > | faceToTriMapOffset_ |
std::vector< int > | triToFaceMap_ |
output tri index -> input face index | |
int | numDrawVerts_ |
vertices in vbo | |
int | numIsolatedVerts_ |
isolated vertices | |
std::vector< int > | indices_ |
index buffer | |
Static Private Attributes | |
static MeshCompilerVertexCompare | defaultVertexCompare |
Definition at line 246 of file MeshCompiler.hh.
void ACG::MeshCompiler::build | ( | bool | _weldVertices = false , |
bool | _optimizeVCache = true , |
||
bool | _needPerFaceAttribute = false , |
||
bool | _keepIsolatedVertices = false |
||
) |
Build vertex + index buffer.
_weldVertices | Compare vertices and attempt to eliminate duplicates. High computation cost |
_optimizeVCache | Reorder faces for optimized vcache usage. High computation cost |
_needPerFaceAttribute | User wants to set per-face attributes in draw vertex buffer. Per-face data can be stored in the provoking vertex of each face. Low computation cost |
_keepIsolatedVertices | Isolated vertices should not be discarded in the output vertex buffer |
Definition at line 1705 of file MeshCompiler.cc.
int ACG::MeshCompiler::findGroupSubset | ( | int | _groupID | ) |
get subset ID of a group
_groupID | Id of the group |
Definition at line 1948 of file MeshCompiler.cc.
int ACG::MeshCompiler::getFaceGroup | ( | int | _faceID | ) | const |
Get Face Group of the given face.
_faceID | Id of the face |
Definition at line 1940 of file MeshCompiler.cc.
|
inline |
Get size of input face.
_i | Index |
Definition at line 604 of file MeshCompiler.hh.
int ACG::MeshCompiler::getIndex | ( | int | _i | ) | const |
Get index in final draw index buffer.
Definition at line 3041 of file MeshCompiler.cc.
void ACG::MeshCompiler::getIndexAdjBuffer | ( | void * | _dst, |
const int | _borderIndex = -1 |
||
) |
Get index buffer with adjacency information ready for rendering.
This index buffer can be used to render in GL_TRIANGLES_ADJACENCY mode. For each triangle, it contains the 3 neighboring triangles with a shared edge in addition to the triangle vertices. Each triangle stores 6 indices: 0 - first vertex of triangle 1 - opposite vertex to first edge of adjacent triangle 2 - second vertex of triangle 3 - opposite vertex to second edge of adjacent triangle 4 - third vertex of triangle 5 - opposite vertex to third edge of adjacent triangle
5___4___3 \ /\ / \/__\/ 0\ /2 \/ 1
_dst | [out] Pointer to memory address where the 32bit index buffer should be copied to. Must have size of at least 6 * numTris * 4 bytes |
_borderIndex | index to use for border edges (missing adjacent triangles) |
Definition at line 3275 of file MeshCompiler.cc.
void ACG::MeshCompiler::getIndexAdjBuffer_BruteForce | ( | void * | _dst, |
const int | _borderIndex = -1 |
||
) |
Slow brute-force version of getIndexAdjBuffer.
Computes index buffer with adjacency information, but uses a much simpler algorithm. Runtime = O(n^2), but this can be used to verify the result of getIndexAdjBuffer. Results from brute-force and optimized algorithm must be equal for meshes where no edge is shared by more than two triangles.
_dst | [out] Pointer to memory address where the 32bit index buffer should be copied to. Must have size of at least 6 * numTris * 4 bytes |
_borderIndex | index to use for border edges (missing adjacent triangles) |
Definition at line 3596 of file MeshCompiler.cc.
void ACG::MeshCompiler::getIndexAdjBuffer_MT | ( | void * | _dst, |
const int | _borderIndex = -1 |
||
) |
Multi-threaded version of getIndexAdjBuffer.
Uses a multi-threaded method based on the vertex-triangle adjacency list to compute the index buffer with adjacency.
_dst | [out] Pointer to memory address where the 32bit index buffer should be copied to. Must have size of at least 6 * numTris * 4 bytes |
_borderIndex | index to use for border edges (missing adjacent triangles) |
Definition at line 3460 of file MeshCompiler.cc.
|
inline |
Get index buffer ready for rendering.
Definition at line 551 of file MeshCompiler.hh.
|
private |
i: face index j: corner index _out: output vertex (index for each attribute)
Definition at line 1074 of file MeshCompiler.cc.
|
private |
i: face index j: corner index _out: output vertex (index for each attribute) post welding operation
Definition at line 1080 of file MeshCompiler.cc.
|
private |
i: face index j: corner index _out: output vertex address (vertex data)
Definition at line 1098 of file MeshCompiler.cc.
size_t ACG::MeshCompiler::getMemoryUsage | ( | bool | _printConsole = true | ) | const |
return memory consumption in bytes
_printConsole | print detailed memory costs to command console |
Definition at line 3735 of file MeshCompiler.cc.
int ACG::MeshCompiler::getNumFaces | ( | ) | const |
Get number of input faces.
Definition at line 4022 of file MeshCompiler.cc.
int ACG::MeshCompiler::getNumInputAttributes | ( | int | _attrIdx | ) | const |
Get number of attributes in an input buffer
_attrIdx | Attribute id from VertexDeclaration |
Definition at line 1915 of file MeshCompiler.cc.
|
inline |
|
inline |
Get number of triangles in final buffer.
Definition at line 593 of file MeshCompiler.hh.
|
inline |
Get number of vertices in final buffer.
Definition at line 518 of file MeshCompiler.hh.
|
inline |
const MeshCompiler::Subset * ACG::MeshCompiler::getSubset | ( | int | _i | ) | const |
get a specific subset
_i | Id of the subset |
Definition at line 1953 of file MeshCompiler.cc.
int ACG::MeshCompiler::getTriGroup | ( | int | _triID | ) | const |
Get Group Id of the triangle.
_triID | Id of the triangle |
void ACG::MeshCompiler::getVertex | ( | int | _id, |
void * | _out | ||
) | const |
Get vertex in final draw vertex buffer.
Definition at line 3012 of file MeshCompiler.cc.
void ACG::MeshCompiler::getVertexBuffer | ( | void * | _dst, |
const int | _offset = 0 , |
||
const int | _range = -1 |
||
) |
Get vertex buffer ready for rendering.
Query final vertex buffer data. Support vertex buffer batch uploads.
_dst | [out] Pointer to memory address where the vertex buffer should be copied to |
_offset | Begin of vertex buffer batch |
_range | Size of vertex buffer batch. Copies rest of buffer if _range < 0. |
Definition at line 3213 of file MeshCompiler.cc.
|
inline |
Get Vertex declaration.
Definition at line 611 of file MeshCompiler.hh.
bool ACG::MeshCompiler::isFaceEdge | ( | const int | _triID, |
const int | _edge | ||
) | const |
Test if a triangle edge is a face edge from the input buffer.
When a convex n-poly is subdivided into (n-2) triangles, new edges are created which do not exist in the input mesh. This function identifies if an edge was already existant in the input mesh or added during triangulation.
_triID | triangle ID in draw buffer |
_edge | edge of triangle, edge ordering: v0-v1, v1-v2, v2-v0 |
Definition at line 4048 of file MeshCompiler.cc.
bool ACG::MeshCompiler::isTriangleMesh | ( | ) | const |
Test if the input mesh consists of triangles only.
Definition at line 4043 of file MeshCompiler.cc.
int ACG::MeshCompiler::mapToDrawTriID | ( | const int | _faceID, |
const int | _k = 0 , |
||
int * | _numTrisOut = 0 |
||
) | const |
Mapping from input Face id -> draw triangle id
_faceID | Face ID in input data |
_k | triangle no. associated to face, offset 0 |
_numTrisOut | [out] Number of triangles associated to face (if input face was n-poly) |
Definition at line 3722 of file MeshCompiler.cc.
int ACG::MeshCompiler::mapToDrawVertexID | ( | const int | _faceID, |
const int | _cornerID | ||
) | const |
Mapping from input vertex id -> draw vertex id
_faceID | Face ID in input data |
_cornerID | Corner of face |
Definition at line 3717 of file MeshCompiler.cc.
int ACG::MeshCompiler::mapToOriginalFaceID | ( | const int | _triID | ) | const |
Mapping from draw tri id -> input face id
_triID | Triangle ID in draw index buffer |
Definition at line 3666 of file MeshCompiler.cc.
const int * ACG::MeshCompiler::mapToOriginalFaceIDPtr | ( | ) | const |
Get pointer to the lookup table mapping from tri id -> input face id
Definition at line 3683 of file MeshCompiler.cc.
int ACG::MeshCompiler::mapToOriginalVertexID | ( | const int | _i, |
int & | _faceID, | ||
int & | _cornerID | ||
) | const |
Mapping from draw vertex id -> input vertex id
_i | Vertex ID in draw buffer |
_faceID | [out] Face ID in face input buffer |
_cornerID | [out] Corner of face corresponding to vertex. |
Definition at line 3693 of file MeshCompiler.cc.
void ACG::MeshCompiler::setAttrib | ( | int | _attrIdx, |
int | _v, | ||
const void * | _data | ||
) |
Set single custom input attributes.
An internal buffer for the requested attribute must be allocated before using this function. See setAttribVec()
_attrIdx | Attribute id from VertexDeclaration |
_v | Buffer id of the single attribute |
_data | attribute data |
Definition at line 1900 of file MeshCompiler.cc.
void ACG::MeshCompiler::setAttribVec | ( | int | _attrIdx, |
int | _num, | ||
const void * | _data, | ||
int | _stride = 0 , |
||
bool | _internalCopy = false , |
||
GLuint | _fmt = 0 , |
||
int | _elementSize = -1 |
||
) |
Set custom input attribute.
Alternatively allocates an internal buffer only, such that data can be provided via setAttrib().
_attrIdx | Attribute id from VertexDeclaration |
_num | Number of attributes |
_data | Input data buffer, may be null to only allocate an internal buffer |
_stride | Offset difference in bytes to the next attribute in _data. Default value 0 indicates no data alignment/memory packing. |
_internalCopy | Create an internal buffer and make a copy _data |
_fmt | data format of one element (must be set if input data does not match vertex declaration) |
_elementSize | number of elements per attribute (i.e. 3 for vec3 .., -1 if unknown) |
Definition at line 275 of file MeshCompiler.cc.
void ACG::MeshCompiler::setFaceAttrib | ( | int | _i, |
int | _v0, | ||
int | _v1, | ||
int | _v2, | ||
int | _attrID | ||
) |
Set attribute ids per triangle.
_i | Face id |
_v0 | 1st element id |
_v1 | 2nd element id |
_v2 | 3rd element id |
_attrID | Which attribute: index of VertexDeclaration element array |
Definition at line 1237 of file MeshCompiler.cc.
void ACG::MeshCompiler::setFaceAttrib | ( | int | _i, |
int | _faceSize, | ||
int * | _v, | ||
int | _attrID | ||
) |
Set attribute ids per face.
_i | Face id |
_faceSize | Size of face, ie. number of vertices of face |
_v | Element ids |
_attrID | Which attribute: index of VertexDeclaration element array |
Definition at line 1223 of file MeshCompiler.cc.
void ACG::MeshCompiler::setFaceGroup | ( | int | _i, |
short | _groupID | ||
) |
Specify face groups.
Faces with the same group ID will be chunked together in the sorting process. This feature may be used for material/texture subsets.
_i | Face ID |
_groupID | Custom group ID |
Definition at line 3205 of file MeshCompiler.cc.
void ACG::MeshCompiler::setFaceInput | ( | MeshCompilerFaceInput * | _faceInput | ) |
Set Face data input
Making use of the MeshCompilerFaceInput interface completly overrides the default input behavior. Any subsequent call to default input data functions such as setNumFaces(), setFaceVerts() etc. will be ignored
_faceInput | user defined face input (no internal copy made, do not delete while using MeshCompiler) |
Definition at line 3988 of file MeshCompiler.cc.
void ACG::MeshCompiler::setFaceNormals | ( | int | _i, |
int | _v0, | ||
int | _v1, | ||
int | _v2 | ||
) |
Set normal ids per triangle.
_i | Face ID |
_v0 | 1st normal id |
_v1 | 2nd normal id |
_v2 | 3rd normal id |
Definition at line 2994 of file MeshCompiler.cc.
void ACG::MeshCompiler::setFaceNormals | ( | int | _i, |
int | _faceSize, | ||
int * | _v | ||
) |
Set normal ids per face.
_i | Face id |
_faceSize | Size of face, ie. number of vertices of face |
_v | Normal ids |
Definition at line 2989 of file MeshCompiler.cc.
void ACG::MeshCompiler::setFaceTexCoords | ( | int | _i, |
int | _v0, | ||
int | _v1, | ||
int | _v2 | ||
) |
Set texcoord ids per triangle.
_i | Face ID |
_v0 | 1st texcoord id |
_v1 | 2nd texcoord id |
_v2 | 3rd texcoord id |
Definition at line 3006 of file MeshCompiler.cc.
void ACG::MeshCompiler::setFaceTexCoords | ( | int | _i, |
int | _faceSize, | ||
int * | _v | ||
) |
Set texcoord ids per face.
_i | Face id |
_faceSize | Size of face, ie. number of vertices of face |
_v | Texcoord ids |
Definition at line 3001 of file MeshCompiler.cc.
void ACG::MeshCompiler::setFaceVerts | ( | int | _i, |
int | _v0, | ||
int | _v1, | ||
int | _v2 | ||
) |
Set vertex ids per triangle.
_i | Face ID |
_v0 | 1st vertex id |
_v1 | 2nd vertex id |
_v2 | 3rd vertex id |
Definition at line 2983 of file MeshCompiler.cc.
void ACG::MeshCompiler::setFaceVerts | ( | int | _i, |
int | _faceSize, | ||
int * | _v | ||
) |
Set vertex ids per face.
_i | Face id |
_faceSize | Size of face, ie. number of vertices of face |
_v | Vertex ids |
Definition at line 2978 of file MeshCompiler.cc.
void ACG::MeshCompiler::setIndexBufferInterleaved | ( | int | _numTris, |
int | _indexSize, | ||
const void * | _indices | ||
) |
Set index buffer for a triangle mesh.
This should only be used if the input vertex buffer is interleaved already.
_numTris | Number of triangles. |
_indexSize | Size in bytes of one index. |
_indices | Pointer to a buffer containing the index data. |
Definition at line 3993 of file MeshCompiler.cc.
void ACG::MeshCompiler::setNormals | ( | int | _num, |
const void * | _data, | ||
int | _stride = 0 , |
||
bool | _internalCopy = false , |
||
GLuint | _fmt = 0 , |
||
int | _elementSize = -1 |
||
) |
set input normals
_num | Number of normals |
_data | Pointer to normals data |
_stride | Difference in bytes between two normals positions in _data. Default value 0 indicates a tight float3 position array without any other data or memory alignment. |
_internalCopy | Memory optimization flag: select true if the provided data address is only temporarily valid. Otherwise an internal copy must be made. |
_fmt | data format of one element (must be set if input data does not match vertex declaration) |
_elementSize | number of elements per attribute (i.e. 3 for vec3 .., -1 if unknown) |
Definition at line 264 of file MeshCompiler.cc.
void ACG::MeshCompiler::setNumFaces | ( | const int | _numFaces, |
const int | _numIndices | ||
) |
Set number of faces and indices if known by user.
User may give a rough estimate of face/index count. A more accurate estimation improves efficiency: too low numbers result in performance hit, too high numbers in memory consumption
_numFaces | Number of faces. Value 0 accepted at cost of performance |
_numIndices | Number of indices, i.e. 3 * numFaces for triangle meshes. Value 0 accepted at cost of performance |
Definition at line 1208 of file MeshCompiler.cc.
void ACG::MeshCompiler::setProvokingVertex | ( | int | _v | ) |
See glProvokingVertex()
Specifiy the vertex to be used as the source of data for flat shading. The default value is 2, meaning that the last vertex of each triangle will be used. setProvokingVertex() must be called prior to build(), if a different provoking vertex is desired. Additionally build() has to set its _needPerFaceAttribute parameter to true to enable provoking vertices. The provoking vertex of a face is a vertex, which is not shared with any other face in the mesh.
_v | triangle vertex where the provoking vertex should be stored [0, 1, 2] |
Definition at line 4027 of file MeshCompiler.cc.
void ACG::MeshCompiler::setTexCoords | ( | int | _num, |
const void * | _data, | ||
int | _stride = 0 , |
||
bool | _internalCopy = false , |
||
GLuint | _fmt = 0 , |
||
int | _elementSize = -1 |
||
) |
set input texture coords
_num | Number of texture coords |
_data | Pointer to texture coord data |
_stride | Difference in bytes between two texture coordinate positions in _data. Default value 0 indicates a tight float3 position array without any other data or memory alignment. |
_internalCopy | Memory optimization flag: select true if the provided data address is only temporarily valid. Otherwise an internal copy must be made. |
_fmt | data format of one element (must be set if input data does not match vertex declaration) |
_elementSize | number of elements per attribute (i.e. 3 for vec3 .., -1 if unknown) |
Definition at line 269 of file MeshCompiler.cc.
void ACG::MeshCompiler::setVertices | ( | int | _num, |
const void * | _data, | ||
int | _stride = 0 , |
||
bool | _internalCopy = false , |
||
GLuint | _fmt = 0 , |
||
int | _elementSize = -1 |
||
) |
set input vertex positions
_num | Number of vertex positions |
_data | Pointer to vertex data |
_stride | Difference in bytes between two vertex positions in _data. Default value 0 indicates a tight float3 position array without any other data or memory alignment. |
_internalCopy | Memory optimization flag: select true if the provided data address is only temporarily valid. Otherwise an internal copy must be made. |
_fmt | data format of one element (must be set if input data does not match vertex declaration) |
_elementSize | number of elements per attribute (i.e. 3 for vec3 .., -1 if unknown) |
Definition at line 259 of file MeshCompiler.cc.