diff options
Diffstat (limited to 'source/blender/nodes/geometry/nodes/node_geo_curve_primitive_circle.cc')
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_curve_primitive_circle.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_circle.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_circle.cc index 7b5d1a1dc80..a7fb493c7d7 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_circle.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_circle.cc @@ -101,8 +101,8 @@ static void node_update(bNodeTree *ntree, bNode *node) static bool colinear_f3_f3_f3(const float3 p1, const float3 p2, const float3 p3) { - const float3 a = math::normalize(p2 - p1); - const float3 b = math::normalize(p3 - p1); + const float3 a = (p2 - p1).normalized(); + const float3 b = (p3 - p1).normalized(); return (ELEM(a, b, b * -1.0f)); } @@ -122,18 +122,18 @@ static std::unique_ptr<CurveEval> create_point_circle_curve( float3 center; /* Midpoints of `P1->P2` and `P2->P3`. */ - const float3 q1 = math::interpolate(p1, p2, 0.5f); - const float3 q2 = math::interpolate(p2, p3, 0.5f); + const float3 q1 = float3::interpolate(p1, p2, 0.5f); + const float3 q2 = float3::interpolate(p2, p3, 0.5f); /* Normal Vectors of `P1->P2` and `P2->P3` */ - const float3 v1 = math::normalize(p2 - p1); - const float3 v2 = math::normalize(p3 - p2); + const float3 v1 = (p2 - p1).normalized(); + const float3 v2 = (p3 - p2).normalized(); /* Normal of plane of main 2 segments P1->P2 and `P2->P3`. */ - const float3 v3 = math::normalize(math::cross(v1, v2)); + const float3 v3 = float3::cross(v1, v2).normalized(); /* Normal of plane of first perpendicular bisector and `P1->P2`. */ - const float3 v4 = math::normalize(math::cross(v3, v1)); + const float3 v4 = float3::cross(v3, v1).normalized(); /* Determine Center-point from the intersection of 3 planes. */ float plane_1[4], plane_2[4], plane_3[4]; @@ -148,7 +148,7 @@ static std::unique_ptr<CurveEval> create_point_circle_curve( } /* Get the radius from the center-point to p1. */ - const float r = math::distance(p1, center); + const float r = float3::distance(p1, center); const float theta_step = ((2 * M_PI) / (float)resolution); for (const int i : IndexRange(resolution)) { |