|
Blender V4.3
|
#include "BLI_sys_types.h"Go to the source code of this file.
Classes | |
| struct | MSelect |
| struct | MFloatProperty |
| struct | MIntProperty |
| struct | MStringProperty |
| struct | MBoolProperty |
| struct | MInt8Property |
| struct | MDeformWeight |
| struct | MDeformVert |
| struct | MVertSkin |
| struct | MLoopCol |
| struct | MPropCol |
| struct | MDisps |
| struct | GridPaintMask |
| struct | OrigSpaceFace |
| struct | OrigSpaceLoop |
| struct | FreestyleEdge |
| struct | FreestyleFace |
| struct | MFace |
| struct | MTFace |
| struct | MCol |
Typedefs | |
Custom Data (Generic) | |
#Mesh::corner_tris() gives access to runtime triangulation data for Mesh, for functionality that doesn't support ngons. Typical usage includes:
A mesh's triangulation data, which uses a cache that is lazily calculated from faces, corner vert, and position arrays. In rare cases it is calculated directly too, with #bke::mesh::corner_tris_calc. When the underlying mesh data changes, the array is recalculated from scratch; there is no extra attempt to maintain the validity over time. Triangles are stored in an array, where triangles from each face are stored sequentially. The triangles order is guaranteed to match the face order where the first triangle will always be from the first face, and the last triangle from the last face. The number of triangles for each polygon is guaranteed to be the corner count - 2, even for degenerate geometry (see #bke::mesh::face_triangles_num). Storing corner indices (instead of vertex indices) gives more flexibility for accessing mesh data stored per-corner, though it does often add an extra level of indirection. The index of the corresponding face for each triangle is stored in a separate array, accessed with #Mesh::corner_tri_faces(). Examples: // Access vertex locations.
std::array<float3, 3> tri_positions{
positions[corner_verts[tri[0]]],
positions[corner_verts[tri[1]]],
positions[corner_verts[tri[2]]],
};
// Access UV coordinates (works for all face corner data, vertex colors... etc).
std::array<float2, 3> tri_uvs{
uv_map[tri[0]],
uv_map[tri[1]],
uv_map[tri[2]],
};
// Access all triangles in a given face.
const Span<int3> corner_tris = corner_tris.slice(face_triangles_range(faces, i));
IndexRange face_triangles_range(OffsetIndices< int > faces, int face_i) Definition BKE_mesh.hh:296 It may also be useful to check whether or not two vertices of a triangle form an edge in the underlying mesh. See #bke::mesh::corner_tri for a utility that does this. Note that a triangle may be in the middle of an ngon and not reference any real edges. | |
| typedef struct MFloatProperty | MFloatProperty |
| typedef struct MIntProperty | MIntProperty |
| typedef struct MStringProperty | MStringProperty |
| typedef struct MBoolProperty | MBoolProperty |
| typedef struct MInt8Property | MInt8Property |
Custom Data (Loop) | |
| typedef struct MLoopCol | MLoopCol |
| typedef struct MPropCol | MPropCol |
| typedef struct MDisps | MDisps |
| typedef struct GridPaintMask | GridPaintMask |
Custom Data (Original Space for Poly, Face) | |
| typedef struct OrigSpaceFace | OrigSpaceFace |
| typedef struct OrigSpaceLoop | OrigSpaceLoop |
Ordered Selection Storage | |
| enum | { ME_VSEL = 0 , ME_ESEL = 1 , ME_FSEL = 2 } |
| typedef struct MSelect | MSelect |
Custom Data (Vertex) | |
| enum | eMVertSkinFlag { MVERT_SKIN_ROOT = 1 , MVERT_SKIN_LOOSE = 2 } |
| typedef struct MDeformWeight | MDeformWeight |
| typedef struct MDeformVert | MDeformVert |
| typedef struct MVertSkin | MVertSkin |
| typedef enum eMVertSkinFlag | eMVertSkinFlag |
Custom Data (FreeStyle for Edge, Face) | |
| enum | { FREESTYLE_EDGE_MARK = 1 } |
| enum | { FREESTYLE_FACE_MARK = 1 } |
| typedef struct FreestyleEdge | FreestyleEdge |
| typedef struct FreestyleFace | FreestyleFace |
Deprecated Structs | |
| enum | { ME_V1V2 = (1 << 0) , ME_V2V3 = (1 << 1) , ME_V3V1 = (1 << 2) , ME_V3V4 = ME_V3V1 , ME_V4V1 = (1 << 3) } |
| typedef struct MFace | MFace |
| typedef struct MTFace | MTFace |
| typedef struct MCol | MCol |
| typedef enum eMVertSkinFlag eMVertSkinFlag |
| typedef struct FreestyleEdge FreestyleEdge |
| typedef struct FreestyleFace FreestyleFace |
| typedef struct GridPaintMask GridPaintMask |
Multi-Resolution grid loop data.
| typedef struct MBoolProperty MBoolProperty |
| typedef struct MCol MCol |
Tessellation vertex color data.
| typedef struct MDeformVert MDeformVert |
Stores all of an element's vertex groups, and their weight values.
| typedef struct MDeformWeight MDeformWeight |
Vertex group index and weight for MDeformVert.dw
| typedef struct MDisps MDisps |
Multi-Resolution loop data.
| typedef struct MFace MFace |
Used in Blender pre 2.63, See #Mesh::corner_verts(), #Mesh::faces() for face data stored in the blend file. Use for reading old files and in a handful of cases which should be removed eventually.
| typedef struct MFloatProperty MFloatProperty |
Custom Data Properties
| typedef struct MInt8Property MInt8Property |
| typedef struct MIntProperty MIntProperty |
| typedef struct MLoopCol MLoopCol |
| typedef struct MPropCol MPropCol |
| typedef struct MSelect MSelect |
Optionally store the order of selected elements. This won't always be set since only some selection operations have an order.
Typically accessed from Mesh.mselect
| typedef struct MStringProperty MStringProperty |
Byte string, no encoding implied. May not be null terminated.
| typedef struct MTFace MTFace |
Tessellation uv face data.
| typedef struct MVertSkin MVertSkin |
| typedef struct OrigSpaceFace OrigSpaceFace |
Original space within a face (similar to UV coordinates), however they are used to determine the original position in a face.
Unlike UVs these are not user editable and always start out using a fixed 0-1 range. Currently only used for particle placement.
| typedef struct OrigSpaceLoop OrigSpaceLoop |
| anonymous enum |
| anonymous enum |
| Enumerator | |
|---|---|
| FREESTYLE_EDGE_MARK | |
Definition at line 264 of file DNA_meshdata_types.h.
| anonymous enum |
| Enumerator | |
|---|---|
| FREESTYLE_FACE_MARK | |
Definition at line 273 of file DNA_meshdata_types.h.
| anonymous enum |
| Enumerator | |
|---|---|
| ME_V1V2 | |
| ME_V2V3 | |
| ME_V3V1 | |
| ME_V3V4 | |
| ME_V4V1 | |
Definition at line 410 of file DNA_meshdata_types.h.
| enum eMVertSkinFlag |
Definition at line 166 of file DNA_meshdata_types.h.