Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/BKE_cdderivedmesh.h
| Show All 25 Lines | |||||
| #ifndef __BKE_CDDERIVEDMESH_H__ | #ifndef __BKE_CDDERIVEDMESH_H__ | ||||
| #define __BKE_CDDERIVEDMESH_H__ | #define __BKE_CDDERIVEDMESH_H__ | ||||
| #include "BKE_DerivedMesh.h" | #include "BKE_DerivedMesh.h" | ||||
| #include "BKE_customdata.h" | #include "BKE_customdata.h" | ||||
| struct BMEditMesh; | struct BMEditMesh; | ||||
| struct CustomData_Masks; | |||||
| struct DerivedMesh; | struct DerivedMesh; | ||||
| struct MLoopNorSpaceArray; | struct MLoopNorSpaceArray; | ||||
| struct Mesh; | struct Mesh; | ||||
| struct Object; | struct Object; | ||||
| /* creates a new CDDerivedMesh */ | /* creates a new CDDerivedMesh */ | ||||
| struct DerivedMesh *CDDM_new(int numVerts, int numEdges, int numFaces, | struct DerivedMesh *CDDM_new(int numVerts, int numEdges, int numFaces, | ||||
| int numLoops, int numPolys); | int numLoops, int numPolys); | ||||
| /* creates a CDDerivedMesh from the given Mesh, this will reference the | /* creates a CDDerivedMesh from the given Mesh, this will reference the | ||||
| * original data in Mesh, but it is safe to apply vertex coordinates or | * original data in Mesh, but it is safe to apply vertex coordinates or | ||||
| * calculate normals as those functions will automatically create new | * calculate normals as those functions will automatically create new | ||||
| * data to not overwrite the original */ | * data to not overwrite the original */ | ||||
| struct DerivedMesh *CDDM_from_mesh(struct Mesh *mesh); | struct DerivedMesh *CDDM_from_mesh(struct Mesh *mesh); | ||||
| /* creates a CDDerivedMesh from the given Mesh with custom allocation type. */ | /* creates a CDDerivedMesh from the given Mesh with custom allocation type. */ | ||||
| struct DerivedMesh *CDDM_from_mesh_ex(struct Mesh *mesh, eCDAllocType alloctype, CustomDataMask mask); | struct DerivedMesh *CDDM_from_mesh_ex(struct Mesh *mesh, eCDAllocType alloctype, struct CustomData_Masks mask); | ||||
| struct DerivedMesh *CDDM_from_bmesh(struct BMesh *bm, const bool use_mdisps); | struct DerivedMesh *CDDM_from_bmesh(struct BMesh *bm, const bool use_mdisps); | ||||
| /* creates a CDDerivedMesh from the given BMEditMesh */ | /* creates a CDDerivedMesh from the given BMEditMesh */ | ||||
| DerivedMesh *CDDM_from_editbmesh(struct BMEditMesh *em, const bool use_mdisps, const bool use_tessface); | DerivedMesh *CDDM_from_editbmesh(struct BMEditMesh *em, const bool use_mdisps, const bool use_tessface); | ||||
| /* creates a CDDerivedMesh from the given curve object */ | /* creates a CDDerivedMesh from the given curve object */ | ||||
| struct DerivedMesh *CDDM_from_curve(struct Object *ob); | struct DerivedMesh *CDDM_from_curve(struct Object *ob); | ||||
| /* creates a CDDerivedMesh from the given curve object and specified dispbase */ | /* creates a CDDerivedMesh from the given curve object and specified dispbase */ | ||||
| /* useful for OrcoDM creation for curves with constructive modifiers */ | /* useful for OrcoDM creation for curves with constructive modifiers */ | ||||
| DerivedMesh *CDDM_from_curve_displist(struct Object *ob, struct ListBase *dispbase); | DerivedMesh *CDDM_from_curve_displist(struct Object *ob, struct ListBase *dispbase); | ||||
| /* Copies the given DerivedMesh with verts, faces & edges stored as | /* Copies the given DerivedMesh with verts, faces & edges stored as | ||||
| * custom element data. | * custom element data. | ||||
| */ | */ | ||||
| struct DerivedMesh *CDDM_copy(struct DerivedMesh *dm); | struct DerivedMesh *CDDM_copy(struct DerivedMesh *dm); | ||||
| /* creates a CDDerivedMesh with the same layer stack configuration as the | /* creates a CDDerivedMesh with the same layer stack configuration as the | ||||
| * given DerivedMesh and containing the requested numbers of elements. | * given DerivedMesh and containing the requested numbers of elements. | ||||
| * elements are initialized to all zeros | * elements are initialized to all zeros | ||||
| */ | */ | ||||
| struct DerivedMesh *CDDM_from_template_ex( | struct DerivedMesh *CDDM_from_template_ex(struct DerivedMesh *source, | ||||
| struct DerivedMesh *source, | |||||
| int numVerts, int numEdges, int numFaces, | int numVerts, int numEdges, int numFaces, | ||||
| int numLoops, int numPolys, | int numLoops, int numPolys, | ||||
| CustomDataMask mask); | struct CustomData_Masks mask); | ||||
| struct DerivedMesh *CDDM_from_template( | struct DerivedMesh *CDDM_from_template( | ||||
| struct DerivedMesh *source, | struct DerivedMesh *source, | ||||
| int numVerts, int numEdges, int numFaces, | int numVerts, int numEdges, int numFaces, | ||||
| int numLoops, int numPolys); | int numLoops, int numPolys); | ||||
| /* applies vertex coordinates or normals to a CDDerivedMesh. if the MVert | /* applies vertex coordinates or normals to a CDDerivedMesh. if the MVert | ||||
| * layer is a referenced layer, it will be duplicate to not overwrite the | * layer is a referenced layer, it will be duplicate to not overwrite the | ||||
| * original | * original | ||||
| ▲ Show 20 Lines • Show All 60 Lines • Show Last 20 Lines | |||||