Add CD_POLYINDEX layer to reduce need for retesselations

This commit is contained in:
2011-11-13 15:13:59 +00:00
parent c0934795cb
commit 2266c7fc1c
21 changed files with 176 additions and 154 deletions

View File

@@ -129,11 +129,14 @@ struct DerivedMesh {
struct GPUDrawObject *drawObject;
DerivedMeshType type;
/* Misc. Queries */
/*recalculates mesh tesselation*/
/* calculate vert and face normals */
void (*calcNormals)(DerivedMesh *dm);
/* recalculates mesh tesselation */
void (*recalcTesselation)(DerivedMesh *dm);
/* Misc. Queries */
/* Also called in Editmode */
int (*getNumVerts)(DerivedMesh *dm);
int (*getNumEdges)(DerivedMesh *dm);
@@ -166,8 +169,8 @@ struct DerivedMesh {
void (*copyVertArray)(DerivedMesh *dm, struct MVert *vert_r);
void (*copyEdgeArray)(DerivedMesh *dm, struct MEdge *edge_r);
void (*copyTessFaceArray)(DerivedMesh *dm, struct MFace *face_r);
void (*copyLoopArray)(DerivedMesh *dm, struct MLoop *loop_r);
void (*copyPolyArray)(DerivedMesh *dm, struct MPoly *poly_r);
void (*copyLoopArray)(DerivedMesh *dm, struct MLoop *loop_r);
void (*copyPolyArray)(DerivedMesh *dm, struct MPoly *poly_r);
/* return a copy of all verts/edges/faces from the derived mesh
* it is the caller's responsibility to free the returned pointer
@@ -175,8 +178,8 @@ struct DerivedMesh {
struct MVert *(*dupVertArray)(DerivedMesh *dm);
struct MEdge *(*dupEdgeArray)(DerivedMesh *dm);
struct MFace *(*dupTessFaceArray)(DerivedMesh *dm);
struct MLoop *(*dupLoopArray)(DerivedMesh *dm);
struct MPoly *(*dupPolyArray)(DerivedMesh *dm);
struct MLoop *(*dupLoopArray)(DerivedMesh *dm);
struct MPoly *(*dupPolyArray)(DerivedMesh *dm);
/* return a pointer to a single element of vert/edge/face custom data
* from the derived mesh (this gives a pointer to the actual data, not