Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/BKE_DerivedMesh.h
| Show First 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | |||||
| #include "BLI_compiler_attrs.h" | #include "BLI_compiler_attrs.h" | ||||
| #include "BKE_customdata.h" | #include "BKE_customdata.h" | ||||
| #include "BKE_bvhutils.h" | #include "BKE_bvhutils.h" | ||||
| struct BMEditMesh; | struct BMEditMesh; | ||||
| struct CCGElem; | struct CCGElem; | ||||
| struct CCGKey; | struct CCGKey; | ||||
| struct CustomData_Masks; | |||||
| struct Depsgraph; | struct Depsgraph; | ||||
| struct MEdge; | struct MEdge; | ||||
| struct MFace; | struct MFace; | ||||
| struct MLoopNorSpaceArray; | struct MLoopNorSpaceArray; | ||||
| struct MVert; | struct MVert; | ||||
| struct Mesh; | struct Mesh; | ||||
| struct ModifierData; | struct ModifierData; | ||||
| struct Object; | struct Object; | ||||
| ▲ Show 20 Lines • Show All 257 Lines • ▼ Show 20 Lines | |||||
| void DM_init( | void DM_init( | ||||
| DerivedMesh *dm, DerivedMeshType type, int numVerts, int numEdges, | DerivedMesh *dm, DerivedMeshType type, int numVerts, int numEdges, | ||||
| int numFaces, int numLoops, int numPolys); | int numFaces, int numLoops, int numPolys); | ||||
| void DM_from_template_ex( | void DM_from_template_ex( | ||||
| DerivedMesh *dm, DerivedMesh *source, DerivedMeshType type, | DerivedMesh *dm, DerivedMesh *source, DerivedMeshType type, | ||||
| int numVerts, int numEdges, int numTessFaces, | int numVerts, int numEdges, int numTessFaces, | ||||
| int numLoops, int numPolys, | int numLoops, int numPolys, | ||||
| CustomDataMask mask); | const struct CustomData_Masks *mask); | ||||
| void DM_from_template( | void DM_from_template( | ||||
| DerivedMesh *dm, DerivedMesh *source, | DerivedMesh *dm, DerivedMesh *source, | ||||
| DerivedMeshType type, | DerivedMeshType type, | ||||
| int numVerts, int numEdges, int numFaces, | int numVerts, int numEdges, int numFaces, | ||||
| int numLoops, int numPolys); | int numLoops, int numPolys); | ||||
| /** utility function to release a DerivedMesh's layers | /** utility function to release a DerivedMesh's layers | ||||
| * returns 1 if DerivedMesh has to be released by the backend, 0 otherwise | * returns 1 if DerivedMesh has to be released by the backend, 0 otherwise | ||||
| */ | */ | ||||
| int DM_release(DerivedMesh *dm); | int DM_release(DerivedMesh *dm); | ||||
| /** utility function to convert a DerivedMesh to a Mesh | /** utility function to convert a DerivedMesh to a Mesh | ||||
| */ | */ | ||||
| void DM_to_mesh(DerivedMesh *dm, struct Mesh *me, struct Object *ob, CustomDataMask mask, bool take_ownership); | void DM_to_mesh(DerivedMesh *dm, struct Mesh *me, struct Object *ob, | ||||
| const struct CustomData_Masks *mask, bool take_ownership); | |||||
| void DM_set_only_copy(DerivedMesh *dm, CustomDataMask mask); | void DM_set_only_copy(DerivedMesh *dm, const struct CustomData_Masks *mask); | ||||
| /* adds a vertex/edge/face custom data layer to a DerivedMesh, optionally | /* adds a vertex/edge/face custom data layer to a DerivedMesh, optionally | ||||
| * backed by an external data array | * backed by an external data array | ||||
| * alloctype defines how the layer is allocated or copied, and how it is | * alloctype defines how the layer is allocated or copied, and how it is | ||||
| * freed, see BKE_customdata.h for the different options | * freed, see BKE_customdata.h for the different options | ||||
| */ | */ | ||||
| void DM_add_vert_layer( | void DM_add_vert_layer( | ||||
| struct DerivedMesh *dm, int type, eCDAllocType alloctype, | struct DerivedMesh *dm, int type, eCDAllocType alloctype, | ||||
| ▲ Show 20 Lines • Show All 106 Lines • ▼ Show 20 Lines | void DM_interp_poly_data( | ||||
| int *src_indices, | int *src_indices, | ||||
| float *weights, int count, int dest_index); | float *weights, int count, int dest_index); | ||||
| void mesh_get_mapped_verts_coords(struct Mesh *me_eval, float (*r_cos)[3], const int totcos); | void mesh_get_mapped_verts_coords(struct Mesh *me_eval, float (*r_cos)[3], const int totcos); | ||||
| DerivedMesh *mesh_create_derived_render( | DerivedMesh *mesh_create_derived_render( | ||||
| struct Depsgraph *depsgraph, struct Scene *scene, | struct Depsgraph *depsgraph, struct Scene *scene, | ||||
| struct Object *ob, CustomDataMask dataMask); | struct Object *ob, const struct CustomData_Masks *dataMask); | ||||
| /* same as above but wont use render settings */ | /* same as above but wont use render settings */ | ||||
| DerivedMesh *mesh_create_derived(struct Mesh *me, float (*vertCos)[3]); | DerivedMesh *mesh_create_derived(struct Mesh *me, float (*vertCos)[3]); | ||||
| struct Mesh *editbmesh_get_eval_cage( | struct Mesh *editbmesh_get_eval_cage( | ||||
| struct Depsgraph *depsgraph, struct Scene *scene, struct Object *, | struct Depsgraph *depsgraph, struct Scene *scene, struct Object *, | ||||
| struct BMEditMesh *em, CustomDataMask dataMask); | struct BMEditMesh *em, const struct CustomData_Masks *dataMask); | ||||
| struct Mesh *editbmesh_get_eval_cage_from_orig( | struct Mesh *editbmesh_get_eval_cage_from_orig( | ||||
| struct Depsgraph *depsgraph, struct Scene *scene, struct Object *, | struct Depsgraph *depsgraph, struct Scene *scene, struct Object *, | ||||
| struct BMEditMesh *em, CustomDataMask dataMask); | struct BMEditMesh *em, const struct CustomData_Masks *dataMask); | ||||
| struct Mesh *editbmesh_get_eval_cage_and_final( | struct Mesh *editbmesh_get_eval_cage_and_final( | ||||
| struct Depsgraph *depsgraph, struct Scene *scene, struct Object *, | struct Depsgraph *depsgraph, struct Scene *scene, struct Object *, | ||||
| struct BMEditMesh *em, CustomDataMask dataMask, | struct BMEditMesh *em, const struct CustomData_Masks *dataMask, | ||||
| struct Mesh **r_final); | struct Mesh **r_final); | ||||
| float (*editbmesh_get_vertex_cos(struct BMEditMesh *em, int *r_numVerts))[3]; | float (*editbmesh_get_vertex_cos(struct BMEditMesh *em, int *r_numVerts))[3]; | ||||
| bool editbmesh_modifier_is_enabled(struct Scene *scene, struct ModifierData *md, bool has_prev_mesh); | bool editbmesh_modifier_is_enabled(struct Scene *scene, struct ModifierData *md, bool has_prev_mesh); | ||||
| void makeDerivedMesh( | void makeDerivedMesh( | ||||
| struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct BMEditMesh *em, | struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct BMEditMesh *em, | ||||
| CustomDataMask dataMask, const bool build_shapekey_layers); | const struct CustomData_Masks *dataMask, const bool build_shapekey_layers); | ||||
| void DM_add_named_tangent_layer_for_uv( | void DM_add_named_tangent_layer_for_uv( | ||||
| CustomData *uv_data, CustomData *tan_data, int numLoopData, | CustomData *uv_data, CustomData *tan_data, int numLoopData, | ||||
| const char *layer_name); | const char *layer_name); | ||||
| void DM_calc_loop_tangents( | void DM_calc_loop_tangents( | ||||
| DerivedMesh *dm, bool calc_active_tangent, const char (*tangent_names)[MAX_NAME], | DerivedMesh *dm, bool calc_active_tangent, const char (*tangent_names)[MAX_NAME], | ||||
| int tangent_names_count); | int tangent_names_count); | ||||
| Show All 13 Lines | |||||