Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/pbvh_intern.h
| /* SPDX-License-Identifier: GPL-2.0-or-later */ | /* SPDX-License-Identifier: GPL-2.0-or-later */ | ||||
| #pragma once | #pragma once | ||||
| struct PBVHGPUFormat; | struct PBVHGPUFormat; | ||||
| /** \file | /** \file | ||||
| * \ingroup bke | * \ingroup bke | ||||
| */ | */ | ||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| extern "C" { | extern "C" { | ||||
| #endif | #endif | ||||
| struct MLoop; | |||||
| struct MLoopTri; | struct MLoopTri; | ||||
| struct MPoly; | struct MPoly; | ||||
| /* Axis-aligned bounding box */ | /* Axis-aligned bounding box */ | ||||
| typedef struct { | typedef struct { | ||||
| float bmin[3], bmax[3]; | float bmin[3], bmax[3]; | ||||
| } BB; | } BB; | ||||
| ▲ Show 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | struct PBVHNode { | ||||
| * they appear in another node's vert_indices array, they will | * they appear in another node's vert_indices array, they will | ||||
| * be above that node's 'uniq_verts' value. | * be above that node's 'uniq_verts' value. | ||||
| * | * | ||||
| * Used for leaf nodes in a mesh-based PBVH (not multires.) | * Used for leaf nodes in a mesh-based PBVH (not multires.) | ||||
| */ | */ | ||||
| const int *vert_indices; | const int *vert_indices; | ||||
| unsigned int uniq_verts, face_verts; | unsigned int uniq_verts, face_verts; | ||||
| /* Array of indices into the Mesh's MLoop array. | /* Array of indices into the Mesh's corner array. | ||||
| * PBVH_FACES only. | * PBVH_FACES only. | ||||
| */ | */ | ||||
| int *loop_indices; | int *loop_indices; | ||||
| unsigned int loop_indices_num; | unsigned int loop_indices_num; | ||||
| /* An array mapping face corners into the vert_indices | /* An array mapping face corners into the vert_indices | ||||
| * array. The array is sized to match 'totprim', and each of | * array. The array is sized to match 'totprim', and each of | ||||
| * the face's corners gets an index into the vert_indices | * the face's corners gets an index into the vert_indices | ||||
| ▲ Show 20 Lines • Show All 70 Lines • ▼ Show 20 Lines | struct PBVH { | ||||
| /* NOTE: Normals are not `const` because they can be updated for drawing by sculpt code. */ | /* NOTE: Normals are not `const` because they can be updated for drawing by sculpt code. */ | ||||
| float (*vert_normals)[3]; | float (*vert_normals)[3]; | ||||
| bool *hide_vert; | bool *hide_vert; | ||||
| float (*vert_positions)[3]; | float (*vert_positions)[3]; | ||||
| const struct MPoly *mpoly; | const struct MPoly *mpoly; | ||||
| bool *hide_poly; | bool *hide_poly; | ||||
| /** Material indices. Only valid for polygon meshes. */ | /** Material indices. Only valid for polygon meshes. */ | ||||
| const int *material_indices; | const int *material_indices; | ||||
| const struct MLoop *mloop; | const int *corner_verts; | ||||
| const struct MLoopTri *looptri; | const struct MLoopTri *looptri; | ||||
| CustomData *vdata; | CustomData *vdata; | ||||
| CustomData *ldata; | CustomData *ldata; | ||||
| CustomData *pdata; | CustomData *pdata; | ||||
| int face_sets_color_seed; | int face_sets_color_seed; | ||||
| int face_sets_color_default; | int face_sets_color_default; | ||||
| int *face_sets; | int *face_sets; | ||||
| ▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines | |||||