Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-09-20 15:01:35 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-09-20 16:39:41 +0300
commitd3aafbddd9e44438c3a95f8e92b3870dfa5f7eb5 (patch)
treea70f61d002ae1c2d1c77e3799524d5f8315d1828 /source/blender/blenkernel/BKE_subdiv_ccg.h
parentd511c7205675abdfbe83341aa6409af5d6dee625 (diff)
Subdiv: CCG, store vertex adjacency information
Similar to previous commit, but for vertices.
Diffstat (limited to 'source/blender/blenkernel/BKE_subdiv_ccg.h')
-rw-r--r--source/blender/blenkernel/BKE_subdiv_ccg.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_subdiv_ccg.h b/source/blender/blenkernel/BKE_subdiv_ccg.h
index f8dbd2092f1..ac90c5f7db3 100644
--- a/source/blender/blenkernel/BKE_subdiv_ccg.h
+++ b/source/blender/blenkernel/BKE_subdiv_ccg.h
@@ -79,6 +79,16 @@ typedef struct SubdivCCGAdjacentEdge {
struct CCGElem ***boundary_elements;
} SubdivCCGAdjacentEdge;
+/* Definition of a vertex which is adjacent to at least one of the faces. */
+typedef struct SubdivCCGAdjacentVertex {
+ int num_adjacent_faces;
+ /* Indexed by adjacent face index. */
+ SubdivCCGFace **faces;
+ /* Indexed by adjacent face index, points to a grid element.
+ */
+ struct CCGElem **corner_elements;
+} SubdivCCGAdjacentVertex;
+
/* Representation of subdivision surface which uses CCG grids. */
typedef struct SubdivCCG {
/* This is a subdivision surface this CCG was created for.
@@ -140,6 +150,12 @@ typedef struct SubdivCCG {
int num_adjacent_edges;
SubdivCCGAdjacentEdge *adjacent_edges;
+ /* Vertices which are adjacent to faces
+ * Used for faster grid stitching, in the cost of extra memory.
+ */
+ int num_adjacent_vertices;;
+ SubdivCCGAdjacentVertex *adjacent_vertices;
+
struct DMFlagMat *grid_flag_mats;
BLI_bitmap **grid_hidden;