Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/BKE_DerivedMesh.h
| Show First 20 Lines • Show All 178 Lines • ▼ Show 20 Lines | struct DerivedMesh { | ||||
| BVHCache bvhCache; | BVHCache bvhCache; | ||||
| struct GPUDrawObject *drawObject; | struct GPUDrawObject *drawObject; | ||||
| DerivedMeshType type; | DerivedMeshType type; | ||||
| float auto_bump_scale; | float auto_bump_scale; | ||||
| DMDirtyFlag dirty; | DMDirtyFlag dirty; | ||||
| int totmat; /* total materials. Will be valid only before object drawing. */ | int totmat; /* total materials. Will be valid only before object drawing. */ | ||||
| struct Material **mat; /* material array. Will be valid only before object drawing */ | struct Material **mat; /* material array. Will be valid only before object drawing */ | ||||
| struct { | |||||
| struct MLoopTri *array; | |||||
| int num; | |||||
| int num_alloc; | |||||
| } looptris; | |||||
| /* use for converting to BMesh which doesn't store bevel weight and edge crease by default */ | /* use for converting to BMesh which doesn't store bevel weight and edge crease by default */ | ||||
| char cd_flag; | char cd_flag; | ||||
| /** Calculate vert and face normals */ | /** Calculate vert and face normals */ | ||||
| void (*calcNormals)(DerivedMesh *dm); | void (*calcNormals)(DerivedMesh *dm); | ||||
| /** Calculate loop (split) normals */ | /** Calculate loop (split) normals */ | ||||
| void (*calcLoopNormals)(DerivedMesh *dm, const bool use_split_normals, const float split_angle); | void (*calcLoopNormals)(DerivedMesh *dm, const bool use_split_normals, const float split_angle); | ||||
| /** Calculate loop (split) normals, and returns split loop normal spacearr. */ | /** Calculate loop (split) normals, and returns split loop normal spacearr. */ | ||||
| void (*calcLoopNormalsSpaceArray)(DerivedMesh *dm, const bool use_split_normals, const float split_angle, | void (*calcLoopNormalsSpaceArray)(DerivedMesh *dm, const bool use_split_normals, const float split_angle, | ||||
| struct MLoopNorSpaceArray *r_lnors_spacearr); | struct MLoopNorSpaceArray *r_lnors_spacearr); | ||||
| /** Recalculates mesh tessellation */ | /** Recalculates mesh tessellation */ | ||||
| void (*recalcTessellation)(DerivedMesh *dm); | void (*recalcTessellation)(DerivedMesh *dm); | ||||
psy-fi: Perhaps this is not needed now? | |||||
| void (*recalcLooptri)(DerivedMesh *dm); | |||||
| /* Misc. Queries */ | /* Misc. Queries */ | ||||
| /* Also called in Editmode */ | /* Also called in Editmode */ | ||||
| int (*getNumVerts)(DerivedMesh *dm); | int (*getNumVerts)(DerivedMesh *dm); | ||||
| int (*getNumEdges)(DerivedMesh *dm); | int (*getNumEdges)(DerivedMesh *dm); | ||||
| int (*getNumTessFaces)(DerivedMesh *dm); | int (*getNumTessFaces)(DerivedMesh *dm); | ||||
| int (*getNumLoops)(DerivedMesh *dm); | int (*getNumLoops)(DerivedMesh *dm); | ||||
| int (*getNumPolys)(DerivedMesh *dm); | int (*getNumPolys)(DerivedMesh *dm); | ||||
| ▲ Show 20 Lines • Show All 373 Lines • ▼ Show 20 Lines | |||||
| void DM_free_poly_data(struct DerivedMesh *dm, int index, int count); | void DM_free_poly_data(struct DerivedMesh *dm, int index, int count); | ||||
| /*sets up mpolys for a DM based on face iterators in source*/ | /*sets up mpolys for a DM based on face iterators in source*/ | ||||
| void DM_DupPolys(DerivedMesh *source, DerivedMesh *target); | void DM_DupPolys(DerivedMesh *source, DerivedMesh *target); | ||||
| void DM_ensure_normals(DerivedMesh *dm); | void DM_ensure_normals(DerivedMesh *dm); | ||||
| void DM_ensure_tessface(DerivedMesh *dm); | void DM_ensure_tessface(DerivedMesh *dm); | ||||
| void DM_ensure_looptri_data(DerivedMesh *dm); | |||||
| void DM_ensure_looptri(DerivedMesh *dm); | |||||
| void DM_update_tessface_data(DerivedMesh *dm); | void DM_update_tessface_data(DerivedMesh *dm); | ||||
| void DM_update_materials(DerivedMesh *dm, struct Object *ob); | void DM_update_materials(DerivedMesh *dm, struct Object *ob); | ||||
| struct MTFace *DM_paint_uvlayer_active_get(DerivedMesh *dm, int mat_nr); | struct MTFace *DM_paint_uvlayer_active_get(DerivedMesh *dm, int mat_nr); | ||||
| struct MLoopUV *DM_paint_uvlayer_active_get_mloopuv(DerivedMesh *dm, int mat_nr); | |||||
| void DM_interp_vert_data( | void DM_interp_vert_data( | ||||
| struct DerivedMesh *source, struct DerivedMesh *dest, | struct DerivedMesh *source, struct DerivedMesh *dest, | ||||
| int *src_indices, float *weights, | int *src_indices, float *weights, | ||||
| int count, int dest_index); | int count, int dest_index); | ||||
| typedef float EdgeVertWeight[SUB_ELEMS_EDGE][SUB_ELEMS_EDGE]; | typedef float EdgeVertWeight[SUB_ELEMS_EDGE][SUB_ELEMS_EDGE]; | ||||
| void DM_interp_edge_data( | void DM_interp_edge_data( | ||||
| ▲ Show 20 Lines • Show All 107 Lines • ▼ Show 20 Lines | |||||
| void DM_update_weight_mcol( | void DM_update_weight_mcol( | ||||
| struct Object *ob, struct DerivedMesh *dm, int const draw_flag, | struct Object *ob, struct DerivedMesh *dm, int const draw_flag, | ||||
| float *weights, int num, const int *indices); | float *weights, int num, const int *indices); | ||||
| /** convert layers requested by a GLSL material to actually available layers in | /** convert layers requested by a GLSL material to actually available layers in | ||||
| * the DerivedMesh, with both a pointer for arrays and an offset for editmesh */ | * the DerivedMesh, with both a pointer for arrays and an offset for editmesh */ | ||||
| typedef struct DMVertexAttribs { | typedef struct DMVertexAttribs { | ||||
| struct { | struct { | ||||
| struct MTFace *array; | struct MLoopUV *array; | ||||
| int em_offset, gl_index, gl_texco; | int em_offset, gl_index, gl_texco; | ||||
| } tface[MAX_MTFACE]; | } tface[MAX_MTFACE]; | ||||
| struct { | struct { | ||||
| struct MCol *array; | struct MLoopCol *array; | ||||
| int em_offset, gl_index; | int em_offset, gl_index; | ||||
| } mcol[MAX_MCOL]; | } mcol[MAX_MCOL]; | ||||
| struct { | struct { | ||||
| float (*array)[4]; | float (*array)[4]; | ||||
| int em_offset, gl_index; | int em_offset, gl_index; | ||||
| } tang; | } tang; | ||||
| ▲ Show 20 Lines • Show All 48 Lines • Show Last 20 Lines | |||||
Perhaps this is not needed now?