[Bf-blender-cvs] [0a35a7bd311] bevelv2: Some edge data structures added.
Howard Trickey
noreply at git.blender.org
Thu Oct 6 22:34:59 CEST 2022
Commit: 0a35a7bd311ebffef2ea1542297349e13a7872da
Author: Howard Trickey
Date: Thu Oct 6 16:34:41 2022 -0400
Branches: bevelv2
https://developer.blender.org/rB0a35a7bd311ebffef2ea1542297349e13a7872da
Some edge data structures added.
===================================================================
M source/blender/nodes/geometry/nodes/node_geo_bevel_mesh.cc
===================================================================
diff --git a/source/blender/nodes/geometry/nodes/node_geo_bevel_mesh.cc b/source/blender/nodes/geometry/nodes/node_geo_bevel_mesh.cc
index cf1602f964c..91898834baf 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_bevel_mesh.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_bevel_mesh.cc
@@ -718,6 +718,10 @@ class BevelData {
* an Array of size equal to the number of mesh vertices here.
*/
Map<int, int> vert_to_bvd_index_;
+ /* All the BevelEdges, when edge beveling. */
+ Array<BevelEdge> bevel_edge_;
+ /* Map from mesh edge indiex inot bevel_edge_. */
+ Map<int, int> edge_to_bevel_edge_;
public:
MeshTopology topo;
@@ -808,6 +812,14 @@ void BevelData::calculate_vertex_bevels(const IndexMask to_bevel, VArray<float>
*/
void BevelData::calculate_edge_bevels(const IndexMask to_bevel, VArray<float> amounts)
{
+ bevel_edge_.reinitialize(to_bevel.size());
+ Set<int> need_vert;
+ for (const int e : to_bevel) {
+ need_vert.add(topo.edge_v1(e));
+ need_vert.add(topo.edge_v2(e));
+ }
+ const int tot_need_vert = need_vert.size();
+ bevel_vert_data_.reinitialize(tot_need_vert);
}
/** IndexAlloc allocates sequential integers, starting from a given start value. */
More information about the Bf-blender-cvs
mailing list