|
Blender
V2.59
|
00001 /* 00002 * $Id: BKE_DerivedMesh.h 38866 2011-07-31 02:24:06Z nicholasbishop $ 00003 * 00004 * ***** BEGIN GPL LICENSE BLOCK ***** 00005 * 00006 * This program is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU General Public License 00008 * as published by the Free Software Foundation; either version 2 00009 * of the License, or (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software Foundation, 00018 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00019 * 00020 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 00021 * All rights reserved. 00022 * 00023 * The Original Code is: all of this file. 00024 * 00025 * Contributor(s): none yet. 00026 * 00027 * ***** END GPL LICENSE BLOCK ***** 00028 */ 00029 00030 #ifndef BKE_DERIVEDMESH_H 00031 #define BKE_DERIVEDMESH_H 00032 00047 #include "DNA_customdata_types.h" 00048 #include "BKE_customdata.h" 00049 #include "BKE_bvhutils.h" 00050 00051 struct MVert; 00052 struct MEdge; 00053 struct MFace; 00054 struct MTFace; 00055 struct Object; 00056 struct Scene; 00057 struct Mesh; 00058 struct EditMesh; 00059 struct KeyBlock; 00060 struct ModifierData; 00061 struct MCol; 00062 struct ColorBand; 00063 struct GPUVertexAttribs; 00064 struct GPUDrawObject; 00065 struct ListBase; 00066 struct PBVH; 00067 00068 /* number of sub-elements each mesh element has (for interpolation) */ 00069 #define SUB_ELEMS_VERT 0 00070 #define SUB_ELEMS_EDGE 2 00071 #define SUB_ELEMS_FACE 4 00072 00073 typedef struct DMGridData { 00074 float co[3]; 00075 float no[3]; 00076 } DMGridData; 00077 00078 typedef struct DMGridAdjacency { 00079 int index[4]; 00080 int rotation[4]; 00081 } DMGridAdjacency; 00082 00083 typedef enum DerivedMeshType { 00084 DM_TYPE_CDDM, 00085 DM_TYPE_EDITMESH, 00086 DM_TYPE_CCGDM 00087 } DerivedMeshType; 00088 00089 typedef struct DerivedMesh DerivedMesh; 00090 struct DerivedMesh { 00091 /* Private DerivedMesh data, only for internal DerivedMesh use */ 00092 CustomData vertData, edgeData, faceData; 00093 int numVertData, numEdgeData, numFaceData; 00094 int needsFree; /* checked on ->release, is set to 0 for cached results */ 00095 int deformedOnly; /* set by modifier stack if only deformed from original */ 00096 BVHCache bvhCache; 00097 struct GPUDrawObject *drawObject; 00098 DerivedMeshType type; 00099 00100 /* Misc. Queries */ 00101 00102 /* Also called in Editmode */ 00103 int (*getNumVerts)(DerivedMesh *dm); 00104 /* Also called in Editmode */ 00105 int (*getNumFaces)(DerivedMesh *dm); 00106 00107 int (*getNumEdges)(DerivedMesh *dm); 00108 00109 /* copy a single vert/edge/face from the derived mesh into 00110 * *{vert/edge/face}_r. note that the current implementation 00111 * of this function can be quite slow, iterating over all 00112 * elements (editmesh) 00113 */ 00114 void (*getVert)(DerivedMesh *dm, int index, struct MVert *vert_r); 00115 void (*getEdge)(DerivedMesh *dm, int index, struct MEdge *edge_r); 00116 void (*getFace)(DerivedMesh *dm, int index, struct MFace *face_r); 00117 00118 /* return a pointer to the entire array of verts/edges/face from the 00119 * derived mesh. if such an array does not exist yet, it will be created, 00120 * and freed on the next ->release(). consider using getVert/Edge/Face if 00121 * you are only interested in a few verts/edges/faces. 00122 */ 00123 struct MVert *(*getVertArray)(DerivedMesh *dm); 00124 struct MEdge *(*getEdgeArray)(DerivedMesh *dm); 00125 struct MFace *(*getFaceArray)(DerivedMesh *dm); 00126 00127 /* copy all verts/edges/faces from the derived mesh into 00128 * *{vert/edge/face}_r (must point to a buffer large enough) 00129 */ 00130 void (*copyVertArray)(DerivedMesh *dm, struct MVert *vert_r); 00131 void (*copyEdgeArray)(DerivedMesh *dm, struct MEdge *edge_r); 00132 void (*copyFaceArray)(DerivedMesh *dm, struct MFace *face_r); 00133 00134 /* return a copy of all verts/edges/faces from the derived mesh 00135 * it is the caller's responsibility to free the returned pointer 00136 */ 00137 struct MVert *(*dupVertArray)(DerivedMesh *dm); 00138 struct MEdge *(*dupEdgeArray)(DerivedMesh *dm); 00139 struct MFace *(*dupFaceArray)(DerivedMesh *dm); 00140 00141 /* return a pointer to a single element of vert/edge/face custom data 00142 * from the derived mesh (this gives a pointer to the actual data, not 00143 * a copy) 00144 */ 00145 void *(*getVertData)(DerivedMesh *dm, int index, int type); 00146 void *(*getEdgeData)(DerivedMesh *dm, int index, int type); 00147 void *(*getFaceData)(DerivedMesh *dm, int index, int type); 00148 00149 /* return a pointer to the entire array of vert/edge/face custom data 00150 * from the derived mesh (this gives a pointer to the actual data, not 00151 * a copy) 00152 */ 00153 void *(*getVertDataArray)(DerivedMesh *dm, int type); 00154 void *(*getEdgeDataArray)(DerivedMesh *dm, int type); 00155 void *(*getFaceDataArray)(DerivedMesh *dm, int type); 00156 00157 /* optional grid access for subsurf */ 00158 int (*getNumGrids)(DerivedMesh *dm); 00159 int (*getGridSize)(DerivedMesh *dm); 00160 DMGridData **(*getGridData)(DerivedMesh *dm); 00161 DMGridAdjacency *(*getGridAdjacency)(DerivedMesh *dm); 00162 int *(*getGridOffset)(DerivedMesh *dm); 00163 00164 /* Iterate over each mapped vertex in the derived mesh, calling the 00165 * given function with the original vert and the mapped vert's new 00166 * coordinate and normal. For historical reasons the normal can be 00167 * passed as a float or short array, only one should be non-NULL. 00168 */ 00169 void (*foreachMappedVert)( 00170 DerivedMesh *dm, 00171 void (*func)(void *userData, int index, float *co, 00172 float *no_f, short *no_s), 00173 void *userData); 00174 00175 /* Iterate over each mapped edge in the derived mesh, calling the 00176 * given function with the original edge and the mapped edge's new 00177 * coordinates. 00178 */ 00179 void (*foreachMappedEdge)(DerivedMesh *dm, 00180 void (*func)(void *userData, int index, 00181 float *v0co, float *v1co), 00182 void *userData); 00183 00184 /* Iterate over each mapped face in the derived mesh, calling the 00185 * given function with the original face and the mapped face's (or 00186 * faces') center and normal. 00187 */ 00188 void (*foreachMappedFaceCenter)(DerivedMesh *dm, 00189 void (*func)(void *userData, int index, 00190 float *cent, float *no), 00191 void *userData); 00192 00193 /* Iterate over all vertex points, calling DO_MINMAX with given args. 00194 * 00195 * Also called in Editmode 00196 */ 00197 void (*getMinMax)(DerivedMesh *dm, float min_r[3], float max_r[3]); 00198 00199 /* Direct Access Operations */ 00200 /* o Can be undefined */ 00201 /* o Must be defined for modifiers that only deform however */ 00202 00203 /* Get vertex location, undefined if index is not valid */ 00204 void (*getVertCo)(DerivedMesh *dm, int index, float co_r[3]); 00205 00206 /* Fill the array (of length .getNumVerts()) with all vertex locations */ 00207 void (*getVertCos)(DerivedMesh *dm, float (*cos_r)[3]); 00208 00209 /* Get smooth vertex normal, undefined if index is not valid */ 00210 void (*getVertNo)(DerivedMesh *dm, int index, float no_r[3]); 00211 00212 /* Get a map of vertices to faces 00213 */ 00214 struct ListBase *(*getFaceMap)(struct Object *ob, DerivedMesh *dm); 00215 00216 /* Get the BVH used for paint modes 00217 */ 00218 struct PBVH *(*getPBVH)(struct Object *ob, DerivedMesh *dm); 00219 00220 /* Drawing Operations */ 00221 00222 /* Draw all vertices as bgl points (no options) */ 00223 void (*drawVerts)(DerivedMesh *dm); 00224 00225 /* Draw edges in the UV mesh (if exists) */ 00226 void (*drawUVEdges)(DerivedMesh *dm); 00227 00228 /* Draw all edges as lines (no options) 00229 * 00230 * Also called for *final* editmode DerivedMeshes 00231 */ 00232 void (*drawEdges)(DerivedMesh *dm, int drawLooseEdges, int drawAllEdges); 00233 00234 /* Draw all loose edges (edges w/ no adjoining faces) */ 00235 void (*drawLooseEdges)(DerivedMesh *dm); 00236 00237 /* Draw all faces 00238 * o Set face normal or vertex normal based on inherited face flag 00239 * o Use inherited face material index to call setMaterial 00240 * o Only if setMaterial returns true 00241 * 00242 * Also called for *final* editmode DerivedMeshes 00243 */ 00244 void (*drawFacesSolid)(DerivedMesh *dm, float (*partial_redraw_planes)[4], 00245 int fast, int (*setMaterial)(int, void *attribs)); 00246 00247 /* Draw all faces 00248 * o If useTwoSided, draw front and back using col arrays 00249 * o col1,col2 are arrays of length numFace*4 of 4 component colors 00250 * in ABGR format, and should be passed as per-face vertex color. 00251 */ 00252 void (*drawFacesColored)(DerivedMesh *dm, int useTwoSided, 00253 unsigned char *col1, unsigned char *col2); 00254 00255 /* Draw all faces using MTFace 00256 * o Drawing options too complicated to enumerate, look at code. 00257 */ 00258 void (*drawFacesTex)(DerivedMesh *dm, 00259 int (*setDrawOptions)(struct MTFace *tface, 00260 struct MCol *mcol, int matnr)); 00261 00262 /* Draw all faces with GLSL materials 00263 * o setMaterial is called for every different material nr 00264 * o Only if setMaterial returns true 00265 */ 00266 void (*drawFacesGLSL)(DerivedMesh *dm, 00267 int (*setMaterial)(int, void *attribs)); 00268 00269 /* Draw mapped faces (no color, or texture) 00270 * o Only if !setDrawOptions or 00271 * setDrawOptions(userData, mapped-face-index, drawSmooth_r) 00272 * returns true 00273 * 00274 * If drawSmooth is set to true then vertex normals should be set and 00275 * glShadeModel called with GL_SMOOTH. Otherwise the face normal should 00276 * be set and glShadeModel called with GL_FLAT. 00277 * 00278 * The setDrawOptions is allowed to not set drawSmooth (for example, when 00279 * lighting is disabled), in which case the implementation should draw as 00280 * smooth shaded. 00281 */ 00282 void (*drawMappedFaces)(DerivedMesh *dm, 00283 int (*setDrawOptions)(void *userData, int index, 00284 int *drawSmooth_r), 00285 void *userData, int useColors, 00286 int (*setMaterial)(int, void *attribs)); 00287 00288 /* Draw mapped faces using MTFace 00289 * o Drawing options too complicated to enumerate, look at code. 00290 */ 00291 void (*drawMappedFacesTex)(DerivedMesh *dm, 00292 int (*setDrawOptions)(void *userData, 00293 int index), 00294 void *userData); 00295 00296 /* Draw mapped faces with GLSL materials 00297 * o setMaterial is called for every different material nr 00298 * o setDrawOptions is called for every face 00299 * o Only if setMaterial and setDrawOptions return true 00300 */ 00301 void (*drawMappedFacesGLSL)(DerivedMesh *dm, 00302 int (*setMaterial)(int, void *attribs), 00303 int (*setDrawOptions)(void *userData, int index), void *userData); 00304 00305 /* Draw mapped edges as lines 00306 * o Only if !setDrawOptions or setDrawOptions(userData, mapped-edge) 00307 * returns true 00308 */ 00309 void (*drawMappedEdges)(DerivedMesh *dm, 00310 int (*setDrawOptions)(void *userData, int index), 00311 void *userData); 00312 00313 /* Draw mapped edges as lines with interpolation values 00314 * o Only if !setDrawOptions or 00315 * setDrawOptions(userData, mapped-edge, mapped-v0, mapped-v1, t) 00316 * returns true 00317 * 00318 * NOTE: This routine is optional! 00319 */ 00320 void (*drawMappedEdgesInterp)(DerivedMesh *dm, 00321 int (*setDrawOptions)(void *userData, 00322 int index), 00323 void (*setDrawInterpOptions)(void *userData, 00324 int index, 00325 float t), 00326 void *userData); 00327 00328 /* Release reference to the DerivedMesh. This function decides internally 00329 * if the DerivedMesh will be freed, or cached for later use. */ 00330 void (*release)(DerivedMesh *dm); 00331 }; 00332 00333 /* utility function to initialise a DerivedMesh's function pointers to 00334 * the default implementation (for those functions which have a default) 00335 */ 00336 void DM_init_funcs(DerivedMesh *dm); 00337 00338 /* utility function to initialise a DerivedMesh for the desired number 00339 * of vertices, edges and faces (doesn't allocate memory for them, just 00340 * sets up the custom data layers) 00341 */ 00342 void DM_init(DerivedMesh *dm, DerivedMeshType type, 00343 int numVerts, int numEdges, int numFaces); 00344 00345 /* utility function to initialise a DerivedMesh for the desired number 00346 * of vertices, edges and faces, with a layer setup copied from source 00347 */ 00348 void DM_from_template(DerivedMesh *dm, DerivedMesh *source, 00349 DerivedMeshType type, 00350 int numVerts, int numEdges, int numFaces); 00351 00352 /* utility function to release a DerivedMesh's layers 00353 * returns 1 if DerivedMesh has to be released by the backend, 0 otherwise 00354 */ 00355 int DM_release(DerivedMesh *dm); 00356 00357 /* utility function to convert a DerivedMesh to a Mesh 00358 */ 00359 void DM_to_mesh(DerivedMesh *dm, struct Mesh *me); 00360 00361 /* utility function to convert a DerivedMesh to a shape key block 00362 */ 00363 void DM_to_meshkey(DerivedMesh *dm, struct Mesh *me, struct KeyBlock *kb); 00364 00365 /* set the CD_FLAG_NOCOPY flag in custom data layers where the mask is 00366 * zero for the layer type, so only layer types specified by the mask 00367 * will be copied 00368 */ 00369 void DM_set_only_copy(DerivedMesh *dm, CustomDataMask mask); 00370 00371 /* adds a vertex/edge/face custom data layer to a DerivedMesh, optionally 00372 * backed by an external data array 00373 * alloctype defines how the layer is allocated or copied, and how it is 00374 * freed, see BKE_customdata.h for the different options 00375 */ 00376 void DM_add_vert_layer(struct DerivedMesh *dm, int type, int alloctype, 00377 void *layer); 00378 void DM_add_edge_layer(struct DerivedMesh *dm, int type, int alloctype, 00379 void *layer); 00380 void DM_add_face_layer(struct DerivedMesh *dm, int type, int alloctype, 00381 void *layer); 00382 00383 /* custom data access functions 00384 * return pointer to data from first layer which matches type 00385 * if they return NULL for valid indices, data doesn't exist 00386 * note these return pointers - any change modifies the internals of the mesh 00387 */ 00388 void *DM_get_vert_data(struct DerivedMesh *dm, int index, int type); 00389 void *DM_get_edge_data(struct DerivedMesh *dm, int index, int type); 00390 void *DM_get_face_data(struct DerivedMesh *dm, int index, int type); 00391 00392 /* custom data layer access functions 00393 * return pointer to first data layer which matches type (a flat array) 00394 * if they return NULL, data doesn't exist 00395 * note these return pointers - any change modifies the internals of the mesh 00396 */ 00397 void *DM_get_vert_data_layer(struct DerivedMesh *dm, int type); 00398 void *DM_get_edge_data_layer(struct DerivedMesh *dm, int type); 00399 void *DM_get_face_data_layer(struct DerivedMesh *dm, int type); 00400 00401 /* custom data setting functions 00402 * copy supplied data into first layer of type using layer's copy function 00403 * (deep copy if appropriate) 00404 */ 00405 void DM_set_vert_data(struct DerivedMesh *dm, int index, int type, void *data); 00406 void DM_set_edge_data(struct DerivedMesh *dm, int index, int type, void *data); 00407 void DM_set_face_data(struct DerivedMesh *dm, int index, int type, void *data); 00408 00409 /* custom data copy functions 00410 * copy count elements from source_index in source to dest_index in dest 00411 * these copy all layers for which the CD_FLAG_NOCOPY flag is not set 00412 */ 00413 void DM_copy_vert_data(struct DerivedMesh *source, struct DerivedMesh *dest, 00414 int source_index, int dest_index, int count); 00415 void DM_copy_edge_data(struct DerivedMesh *source, struct DerivedMesh *dest, 00416 int source_index, int dest_index, int count); 00417 void DM_copy_face_data(struct DerivedMesh *source, struct DerivedMesh *dest, 00418 int source_index, int dest_index, int count); 00419 00420 /* custom data free functions 00421 * free count elements, starting at index 00422 * they free all layers for which the CD_FLAG_NOCOPY flag is not set 00423 */ 00424 void DM_free_vert_data(struct DerivedMesh *dm, int index, int count); 00425 void DM_free_edge_data(struct DerivedMesh *dm, int index, int count); 00426 void DM_free_face_data(struct DerivedMesh *dm, int index, int count); 00427 00428 /* interpolates vertex data from the vertices indexed by src_indices in the 00429 * source mesh using the given weights and stores the result in the vertex 00430 * indexed by dest_index in the dest mesh 00431 */ 00432 void DM_interp_vert_data(struct DerivedMesh *source, struct DerivedMesh *dest, 00433 int *src_indices, float *weights, 00434 int count, int dest_index); 00435 00436 /* interpolates edge data from the edges indexed by src_indices in the 00437 * source mesh using the given weights and stores the result in the edge indexed 00438 * by dest_index in the dest mesh. 00439 * if weights is NULL, all weights default to 1. 00440 * if vert_weights is non-NULL, any per-vertex edge data is interpolated using 00441 * vert_weights[i] multiplied by weights[i]. 00442 */ 00443 typedef float EdgeVertWeight[SUB_ELEMS_EDGE][SUB_ELEMS_EDGE]; 00444 void DM_interp_edge_data(struct DerivedMesh *source, struct DerivedMesh *dest, 00445 int *src_indices, 00446 float *weights, EdgeVertWeight *vert_weights, 00447 int count, int dest_index); 00448 00449 /* interpolates face data from the faces indexed by src_indices in the 00450 * source mesh using the given weights and stores the result in the face indexed 00451 * by dest_index in the dest mesh. 00452 * if weights is NULL, all weights default to 1. 00453 * if vert_weights is non-NULL, any per-vertex face data is interpolated using 00454 * vert_weights[i] multiplied by weights[i]. 00455 */ 00456 typedef float FaceVertWeight[SUB_ELEMS_FACE][SUB_ELEMS_FACE]; 00457 void DM_interp_face_data(struct DerivedMesh *source, struct DerivedMesh *dest, 00458 int *src_indices, 00459 float *weights, FaceVertWeight *vert_weights, 00460 int count, int dest_index); 00461 00462 void DM_swap_face_data(struct DerivedMesh *dm, int index, const int *corner_indices); 00463 00464 /* Temporary? A function to give a colorband to derivedmesh for vertexcolor ranges */ 00465 void vDM_ColorBand_store(struct ColorBand *coba); 00466 00467 /* Simple function to get me->totvert amount of vertices/normals, 00468 correctly deformed and subsurfered. Needed especially when vertexgroups are involved. 00469 In use now by vertex/weigt paint and particles */ 00470 float *mesh_get_mapped_verts_nors(struct Scene *scene, struct Object *ob); 00471 00472 /* */ 00473 DerivedMesh *mesh_get_derived_final(struct Scene *scene, struct Object *ob, 00474 CustomDataMask dataMask); 00475 DerivedMesh *mesh_get_derived_deform(struct Scene *scene, struct Object *ob, 00476 CustomDataMask dataMask); 00477 00478 DerivedMesh *mesh_create_derived_for_modifier(struct Scene *scene, struct Object *ob, struct ModifierData *md); 00479 00480 DerivedMesh *mesh_create_derived_render(struct Scene *scene, struct Object *ob, 00481 CustomDataMask dataMask); 00482 00483 DerivedMesh *mesh_create_derived_index_render(struct Scene *scene, struct Object *ob, CustomDataMask dataMask, int index); 00484 00485 /* same as above but wont use render settings */ 00486 DerivedMesh *mesh_create_derived(struct Mesh *me, struct Object *ob, float (*vertCos)[3]); 00487 DerivedMesh *mesh_create_derived_view(struct Scene *scene, struct Object *ob, 00488 CustomDataMask dataMask); 00489 DerivedMesh *mesh_create_derived_no_deform(struct Scene *scene, struct Object *ob, 00490 float (*vertCos)[3], 00491 CustomDataMask dataMask); 00492 DerivedMesh *mesh_create_derived_no_deform_render(struct Scene *scene, struct Object *ob, 00493 float (*vertCos)[3], 00494 CustomDataMask dataMask); 00495 /* for gameengine */ 00496 DerivedMesh *mesh_create_derived_no_virtual(struct Scene *scene, struct Object *ob, float (*vertCos)[3], 00497 CustomDataMask dataMask); 00498 DerivedMesh *mesh_create_derived_physics(struct Scene *scene, struct Object *ob, float (*vertCos)[3], 00499 CustomDataMask dataMask); 00500 00501 DerivedMesh *editmesh_get_derived(struct EditMesh *em, float (*vertexCos)[3]); 00502 DerivedMesh *editmesh_get_derived_base(struct Object *, struct EditMesh *em); 00503 DerivedMesh *editmesh_get_derived_cage(struct Scene *scene, struct Object *, 00504 struct EditMesh *em, CustomDataMask dataMask); 00505 DerivedMesh *editmesh_get_derived_cage_and_final(struct Scene *scene, struct Object *, 00506 struct EditMesh *em, DerivedMesh **final_r, 00507 CustomDataMask dataMask); 00508 float (*editmesh_get_vertex_cos(struct EditMesh *em, int *numVerts_r))[3]; 00509 int editmesh_modifier_is_enabled(struct Scene *scene, struct ModifierData *md, DerivedMesh *dm); 00510 void makeDerivedMesh(struct Scene *scene, struct Object *ob, struct EditMesh *em, CustomDataMask dataMask); 00511 00512 /* returns an array of deform matrices for crazyspace correction, and the 00513 number of modifiers left */ 00514 int editmesh_get_first_deform_matrices(struct Scene *, struct Object *, struct EditMesh *em, 00515 float (**deformmats)[3][3], float (**deformcos)[3]); 00516 00517 /* returns an array of deform matrices for crazyspace correction when sculpting, 00518 and the number of modifiers left */ 00519 int sculpt_get_deform_matrices(struct Scene *scene, struct Object *ob, 00520 float (**deformmats)[3][3], float (**deformcos)[3]); 00521 00522 void weight_to_rgb(float input, float *fr, float *fg, float *fb); 00523 00524 /* convert layers requested by a GLSL material to actually available layers in 00525 * the DerivedMesh, with both a pointer for arrays and an offset for editmesh */ 00526 typedef struct DMVertexAttribs { 00527 struct { 00528 struct MTFace *array; 00529 int emOffset, glIndex; 00530 } tface[MAX_MTFACE]; 00531 00532 struct { 00533 struct MCol *array; 00534 int emOffset, glIndex; 00535 } mcol[MAX_MCOL]; 00536 00537 struct { 00538 float (*array)[4]; 00539 int emOffset, glIndex; 00540 } tang; 00541 00542 struct { 00543 float (*array)[3]; 00544 int emOffset, glIndex; 00545 } orco; 00546 00547 int tottface, totmcol, tottang, totorco; 00548 } DMVertexAttribs; 00549 00550 void DM_vertex_attributes_from_gpu(DerivedMesh *dm, 00551 struct GPUVertexAttribs *gattribs, DMVertexAttribs *attribs); 00552 00553 void DM_add_tangent_layer(DerivedMesh *dm); 00554 00555 /* Set object's bounding box based on DerivedMesh min/max data */ 00556 void DM_set_object_boundbox(struct Object *ob, DerivedMesh *dm); 00557 00558 #endif 00559