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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-10-08 17:08:16 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-10-08 18:41:52 +0300
commit899b7ff1de1fb648f23765aa412ddc41707ed557 (patch)
tree588121e58b1c1fa7f9a1c0028c6d4c1c85144cb8 /source/blender/blenkernel/BKE_subdiv_ccg.h
parent333293cad7dba595e3894eada4e1092c0208a426 (diff)
Cleanup: avoid converting from CCGElem to SubdivCCGCoord
The other direction is faster.
Diffstat (limited to 'source/blender/blenkernel/BKE_subdiv_ccg.h')
-rw-r--r--source/blender/blenkernel/BKE_subdiv_ccg.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/blenkernel/BKE_subdiv_ccg.h b/source/blender/blenkernel/BKE_subdiv_ccg.h
index 6e2733eb1ac..7c0963680c5 100644
--- a/source/blender/blenkernel/BKE_subdiv_ccg.h
+++ b/source/blender/blenkernel/BKE_subdiv_ccg.h
@@ -92,6 +92,14 @@ typedef struct SubdivToCCGSettings {
bool need_mask;
} SubdivToCCGSettings;
+typedef struct SubdivCCGCoord {
+ /* Index of the grid within SubdivCCG::grids array. */
+ int grid_index;
+
+ /* Coordinate within the grid. */
+ short x, y;
+} SubdivCCGCoord;
+
/* This is actually a coarse face, which consists of multiple CCG grids. */
typedef struct SubdivCCGFace {
/* Total number of grids in this face.
@@ -107,15 +115,15 @@ typedef struct SubdivCCGFace {
typedef struct SubdivCCGAdjacentEdge {
int num_adjacent_faces;
/* Indexed by adjacent face index, then by point index on the edge.
- * points to a grid element. */
- struct CCGElem ***boundary_elements;
+ * points to a coordinate into the grids. */
+ struct SubdivCCGCoord **boundary_coords;
} 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, points to a grid element. */
- struct CCGElem **corner_elements;
+ /* Indexed by adjacent face index, points to a coordinate in the grids. */
+ struct SubdivCCGCoord *corner_coords;
} SubdivCCGAdjacentVertex;
/* Representation of subdivision surface which uses CCG grids. */
@@ -254,14 +262,6 @@ void BKE_subdiv_ccg_topology_counters(const SubdivCCG *subdiv_ccg,
int *r_num_faces,
int *r_num_loops);
-typedef struct SubdivCCGCoord {
- /* Index of the grid within SubdivCCG::grids array. */
- int grid_index;
-
- /* Coordinate within the grid. */
- int x, y;
-} SubdivCCGCoord;
-
typedef struct SubdivCCGNeighbors {
SubdivCCGCoord *coords;
int size;