Blender V2.61 - r43446
|
#include "BKE_DerivedMesh.h"
Go to the source code of this file.
Functions | |
struct DerivedMesh * | CDDM_new (int numVerts, int numEdges, int numFaces) |
struct DerivedMesh * | CDDM_from_mesh (struct Mesh *mesh, struct Object *ob) |
struct DerivedMesh * | CDDM_from_editmesh (struct EditMesh *em, struct Mesh *me) |
struct DerivedMesh * | CDDM_from_curve (struct Object *ob) |
DerivedMesh * | CDDM_from_curve_customDB (struct Object *ob, struct ListBase *dispbase) |
struct DerivedMesh * | CDDM_copy (struct DerivedMesh *dm) |
struct DerivedMesh * | CDDM_from_template (struct DerivedMesh *source, int numVerts, int numEdges, int numFaces) |
void | CDDM_apply_vert_coords (struct DerivedMesh *cddm, float(*vertCoords)[3]) |
void | CDDM_apply_vert_normals (struct DerivedMesh *cddm, short(*vertNormals)[3]) |
void | CDDM_calc_normals (struct DerivedMesh *dm) |
void | CDDM_calc_edges (struct DerivedMesh *dm) |
void | CDDM_lower_num_verts (struct DerivedMesh *dm, int numVerts) |
void | CDDM_lower_num_edges (struct DerivedMesh *dm, int numEdges) |
void | CDDM_lower_num_faces (struct DerivedMesh *dm, int numFaces) |
struct MVert * | CDDM_get_vert (struct DerivedMesh *dm, int index) |
struct MEdge * | CDDM_get_edge (struct DerivedMesh *dm, int index) |
struct MFace * | CDDM_get_face (struct DerivedMesh *dm, int index) |
struct MVert * | CDDM_get_verts (struct DerivedMesh *dm) |
struct MEdge * | CDDM_get_edges (struct DerivedMesh *dm) |
struct MFace * | CDDM_get_faces (struct DerivedMesh *dm) |
CDDerivedMesh (CD = Custom Data) is a DerivedMesh backend which stores mesh elements (vertices, edges and faces) as layers of custom element data.
Definition in file BKE_cdderivedmesh.h.
void CDDM_apply_vert_coords | ( | struct DerivedMesh * | cddm, |
float(*) | vertCoords[3] | ||
) |
Definition at line 1866 of file cdderivedmesh.c.
References CD_MVERT, MVert::co, copy_v3_v3(), CustomData_duplicate_referenced_layer(), i, CDDerivedMesh::mvert, DerivedMesh::numVertData, and DerivedMesh::vertData.
Referenced by create_orco_dm(), curve_calc_modifiers_post(), deformVerts(), editmesh_calc_modifiers(), get_cddm(), get_dm(), mesh_calc_modifiers(), mesh_create_derived(), multires_apply_smat(), and multiresModifier_reshapeFromDeformMod().
void CDDM_apply_vert_normals | ( | struct DerivedMesh * | cddm, |
short(*) | vertNormals[3] | ||
) |
Definition at line 1880 of file cdderivedmesh.c.
References CD_MVERT, copy_v3_v3_short(), CustomData_duplicate_referenced_layer(), i, CDDerivedMesh::mvert, MVert::no, DerivedMesh::numVertData, and DerivedMesh::vertData.
void CDDM_calc_edges | ( | struct DerivedMesh * | dm | ) |
Definition at line 1914 of file cdderivedmesh.c.
References BLI_edgehash_free(), BLI_edgehash_haskey(), BLI_edgehash_insert(), BLI_edgehash_new(), BLI_edgehash_size(), BLI_edgehashIterator_free(), BLI_edgehashIterator_getKey(), BLI_edgehashIterator_isDone(), BLI_edgehashIterator_new(), BLI_edgehashIterator_step(), CD_CALLOC, CD_MEDGE, CD_ORIGINDEX, CustomData_add_layer(), CustomData_free(), CustomData_get_layer(), DerivedMesh::edgeData, i, ME_EDGEDRAW, ME_EDGERENDER, CDDerivedMesh::medge, CDDerivedMesh::mface, NULL, DerivedMesh::numEdgeData, DerivedMesh::numFaceData, ORIGINDEX_NONE, MFace::v1, MFace::v2, MFace::v3, and MFace::v4.
Referenced by applyModifier(), ConvertCSGDescriptorsToDerivedMesh(), and explodeMesh().
void CDDM_calc_normals | ( | struct DerivedMesh * | dm | ) |
Definition at line 1894 of file cdderivedmesh.c.
References CD_CALLOC, CD_MVERT, CD_NORMAL, CDDM_get_faces(), CustomData_add_layer(), CustomData_duplicate_referenced_layer(), CustomData_get_layer(), DerivedMesh::faceData, mesh_calc_normals(), CDDerivedMesh::mvert, NULL, DerivedMesh::numFaceData, DerivedMesh::numVertData, and DerivedMesh::vertData.
Referenced by applyModifier(), ConvertCSGDescriptorsToDerivedMesh(), create_orco_dm(), curve_calc_modifiers_post(), deformVerts(), dynamicPaint_Modifier_apply(), editmesh_calc_modifiers(), explodeMesh(), get_cddm(), mesh_calc_modifiers(), and mesh_create_derived().
struct DerivedMesh* CDDM_copy | ( | struct DerivedMesh * | dm | ) | [read] |
Definition at line 1798 of file cdderivedmesh.c.
References CD_ASSIGN, CD_MEDGE, CD_MFACE, CD_MVERT, CD_ORIGINDEX, cdDM_create(), CustomData_add_layer(), CustomData_copy_data(), DerivedMesh::deformedOnly, CDDerivedMesh::dm, DM_from_template(), DM_TYPE_CDDM, DerivedMesh::dupEdgeArray, DerivedMesh::dupFaceArray, DerivedMesh::dupVertArray, DerivedMesh::edgeData, DerivedMesh::faceData, DerivedMesh::getEdgeDataArray, DerivedMesh::getFaceDataArray, DerivedMesh::getVertDataArray, CDDerivedMesh::medge, CDDerivedMesh::mface, CDDerivedMesh::mvert, DerivedMesh::numEdgeData, DerivedMesh::numFaceData, DerivedMesh::numVertData, and DerivedMesh::vertData.
Referenced by applyModifier(), canvas_copyDerivedMesh(), clothModifier_do(), connect_hair(), curve_calc_modifiers_post(), deformVerts(), dynamicPaint_brushMeshCalculateVelocity(), dynamicPaint_Modifier_apply(), dynamicPaint_paintMesh(), editmesh_calc_modifiers(), get_cddm(), get_multires_dm(), mesh_calc_modifiers(), multiresModifier_reshapeFromDeformMod(), multiresModifier_update(), and psys_render_set().
struct DerivedMesh* CDDM_from_curve | ( | struct Object * | ob | ) | [read] |
Definition at line 1762 of file cdderivedmesh.c.
References CDDM_from_curve_customDB(), and Object::disp.
Referenced by applyModifier(), and get_dm().
DerivedMesh* CDDM_from_curve_customDB | ( | struct Object * | ob, |
struct ListBase * | dispbase | ||
) |
Definition at line 1767 of file cdderivedmesh.c.
References CDDM_new(), DerivedMesh::deformedOnly, CDDerivedMesh::medge, MEM_freeN(), CDDerivedMesh::mface, CDDerivedMesh::mvert, nurbs_to_mdata_customdb(), and PBVH::totvert.
Referenced by CDDM_from_curve(), create_orco_dm(), and curve_calc_modifiers_post().
struct DerivedMesh* CDDM_from_editmesh | ( | struct EditMesh * | em, |
struct Mesh * | me | ||
) | [read] |
Referenced by applyModifier(), contarget_get_mesh_mat(), create_orco_dm(), deformMatricesEM(), deformVertsEM(), editmesh_calc_modifiers(), and get_dm().
struct DerivedMesh* CDDM_from_mesh | ( | struct Mesh * | mesh, |
struct Object * | ob | ||
) | [read] |
Referenced by applyModifier(), BL_ConvertMesh(), create_orco_dm(), deformMatrices(), deformVerts(), distribute_threads_init_data(), get_dm(), mesh_calc_modifiers(), mesh_create_derived(), multires_load_old(), multires_subdivide(), multiresbake_create_hiresdm(), multiresbake_create_loresdm(), multiresModifier_base_apply(), multiresModifier_update(), CcdShapeConstructionInfo::SetMesh(), and subsurf_calculate_limit_positions().
struct DerivedMesh* CDDM_from_template | ( | struct DerivedMesh * | source, |
int | numVerts, | ||
int | numEdges, | ||
int | numFaces | ||
) | [read] |
Definition at line 1833 of file cdderivedmesh.c.
References CD_CALLOC, CD_MEDGE, CD_MFACE, CD_MVERT, CD_ORIGINDEX, cdDM_create(), CustomData_add_layer(), CustomData_get_layer(), CDDerivedMesh::dm, DM_from_template(), DM_TYPE_CDDM, DerivedMesh::edgeData, DerivedMesh::faceData, DerivedMesh::getEdgeDataArray, DerivedMesh::getFaceDataArray, DerivedMesh::getVertDataArray, CDDerivedMesh::medge, CDDerivedMesh::mface, CDDerivedMesh::mvert, NULL, and DerivedMesh::vertData.
Referenced by applyModifier(), arrayModifier_doArray(), BME_bmesh_to_derivedmesh(), CDDM_from_smoothmesh(), cutEdges(), doMirrorOnAxis(), and explodeMesh().
struct MEdge* CDDM_get_edge | ( | struct DerivedMesh * | dm, |
int | index | ||
) | [read] |
Definition at line 1999 of file cdderivedmesh.c.
Referenced by applyModifier(), and doMirrorOnAxis().
struct MEdge* CDDM_get_edges | ( | struct DerivedMesh * | dm | ) | [read] |
Definition at line 2014 of file cdderivedmesh.c.
Referenced by arrayModifier_doArray(), BME_bmesh_to_derivedmesh(), CDDM_from_smoothmesh(), and do_hair_dynamics().
struct MFace* CDDM_get_face | ( | struct DerivedMesh * | dm, |
int | index | ||
) | [read] |
Definition at line 2004 of file cdderivedmesh.c.
Referenced by applyModifier(), closest_point_on_surface(), connect_hair(), ConvertCSGDescriptorsToDerivedMesh(), cutEdges(), doMirrorOnAxis(), explodeMesh(), get_dface(), and InterpCSGFace().
struct MFace* CDDM_get_faces | ( | struct DerivedMesh * | dm | ) | [read] |
Definition at line 2019 of file cdderivedmesh.c.
Referenced by arrayModifier_doArray(), BME_bmesh_to_derivedmesh(), CDDM_calc_normals(), and CDDM_from_smoothmesh().
struct MVert* CDDM_get_vert | ( | struct DerivedMesh * | dm, |
int | index | ||
) | [read] |
Definition at line 1994 of file cdderivedmesh.c.
Referenced by applyModifier(), connect_hair(), ConvertCSGDescriptorsToDerivedMesh(), cutEdges(), deformVerts(), doMirrorOnAxis(), explodeMesh(), init_particle_interpolation(), and InterpCSGFace().
struct MVert* CDDM_get_verts | ( | struct DerivedMesh * | dm | ) | [read] |
Definition at line 2009 of file cdderivedmesh.c.
Referenced by arrayModifier_doArray(), BME_bmesh_to_derivedmesh(), cdDM_foreachMappedVert(), CDDM_from_smoothmesh(), cdDM_getVertCos(), cloth_to_object(), displaceModifier_do(), and do_hair_dynamics().
void CDDM_lower_num_edges | ( | struct DerivedMesh * | dm, |
int | numEdges | ||
) |
Definition at line 1978 of file cdderivedmesh.c.
References CustomData_free_elem(), DerivedMesh::edgeData, and DerivedMesh::numEdgeData.
Referenced by arrayModifier_doArray(), and doMirrorOnAxis().
void CDDM_lower_num_faces | ( | struct DerivedMesh * | dm, |
int | numFaces | ||
) |
Definition at line 1986 of file cdderivedmesh.c.
References CustomData_free_elem(), DerivedMesh::faceData, and DerivedMesh::numFaceData.
Referenced by arrayModifier_doArray(), and doMirrorOnAxis().
void CDDM_lower_num_verts | ( | struct DerivedMesh * | dm, |
int | numVerts | ||
) |
Definition at line 1970 of file cdderivedmesh.c.
References CustomData_free_elem(), DerivedMesh::numVertData, and DerivedMesh::vertData.
Referenced by arrayModifier_doArray(), and doMirrorOnAxis().
struct DerivedMesh* CDDM_new | ( | int | numVerts, |
int | numEdges, | ||
int | numFaces | ||
) | [read] |
Definition at line 1615 of file cdderivedmesh.c.
References CD_CALLOC, CD_MEDGE, CD_MFACE, CD_MVERT, CD_ORIGINDEX, cdDM_create(), CustomData_add_layer(), CustomData_get_layer(), CDDerivedMesh::dm, DM_init(), DM_TYPE_CDDM, DerivedMesh::edgeData, DerivedMesh::faceData, CDDerivedMesh::medge, CDDerivedMesh::mface, CDDerivedMesh::mvert, NULL, and DerivedMesh::vertData.
Referenced by CDDM_from_curve_customDB(), CDDM_from_editmesh(), ConvertCSGDescriptorsToDerivedMesh(), and do_hair_dynamics().