diff options
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_curve_primitive_quadrilateral.cc | 40 | ||||
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_curve_to_mesh.cc | 12 |
2 files changed, 26 insertions, 26 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_quadrilateral.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_quadrilateral.cc index 0d78d6c08d1..07ddaa8f61e 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_quadrilateral.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_quadrilateral.cc @@ -30,10 +30,10 @@ static void geo_node_curve_primitive_quadrilateral_declare(NodeDeclarationBuilde b.add_input<decl::Float>("Offset").default_value(1.0f).subtype(PROP_DISTANCE); b.add_input<decl::Float>("Bottom Height").default_value(3.0f).min(0.0f).subtype(PROP_DISTANCE); b.add_input<decl::Float>("Top Height").default_value(1.0f).subtype(PROP_DISTANCE); - b.add_input<decl::Vector>("Point 1").default_value({-1.0f, 1.0f, 0.0f}).subtype(PROP_DISTANCE); - b.add_input<decl::Vector>("Point 2").default_value({1.0f, 1.0f, 0.0f}).subtype(PROP_DISTANCE); - b.add_input<decl::Vector>("Point 3").default_value({1.0f, -1.0f, 0.0f}).subtype(PROP_DISTANCE); - b.add_input<decl::Vector>("Point 4").default_value({-1.0f, -1.0f, 0.0f}).subtype(PROP_DISTANCE); + b.add_input<decl::Vector>("Point 1").default_value({-1.0f, -1.0f, 0.0f}).subtype(PROP_DISTANCE); + b.add_input<decl::Vector>("Point 2").default_value({1.0f, -1.0f, 0.0f}).subtype(PROP_DISTANCE); + b.add_input<decl::Vector>("Point 3").default_value({1.0f, 1.0f, 0.0f}).subtype(PROP_DISTANCE); + b.add_input<decl::Vector>("Point 4").default_value({-1.0f, 1.0f, 0.0f}).subtype(PROP_DISTANCE); b.add_output<decl::Geometry>("Curve"); } @@ -106,10 +106,10 @@ static void create_rectangle_curve(MutableSpan<float3> positions, const float height, const float width) { - positions[0] = float3(width / 2.0f, -height / 2.0f, 0.0f); - positions[1] = float3(-width / 2.0f, -height / 2.0f, 0.0f); - positions[2] = float3(-width / 2.0f, height / 2.0f, 0.0f); - positions[3] = float3(width / 2.0f, height / 2.0f, 0.0f); + positions[0] = float3(width / 2.0f, height / 2.0f, 0.0f); + positions[1] = float3(-width / 2.0f, height / 2.0f, 0.0f); + positions[2] = float3(-width / 2.0f, -height / 2.0f, 0.0f); + positions[3] = float3(width / 2.0f, -height / 2.0f, 0.0f); } static void create_points_curve(MutableSpan<float3> positions, @@ -129,10 +129,10 @@ static void create_parallelogram_curve(MutableSpan<float3> positions, const float width, const float offset) { - positions[0] = float3(width / 2.0f - offset / 2.0f, -height / 2.0f, 0.0f); - positions[1] = float3(-width / 2.0f - offset / 2.0f, -height / 2.0f, 0.0f); - positions[2] = float3(-width / 2.0f + offset / 2.0f, height / 2.0f, 0.0f); - positions[3] = float3(width / 2.0f + offset / 2.0f, height / 2.0f, 0.0f); + positions[0] = float3(width / 2.0f + offset / 2.0f, height / 2.0f, 0.0f); + positions[1] = float3(-width / 2.0f + offset / 2.0f, height / 2.0f, 0.0f); + positions[2] = float3(-width / 2.0f - offset / 2.0f, -height / 2.0f, 0.0f); + positions[3] = float3(width / 2.0f - offset / 2.0f, -height / 2.0f, 0.0f); } static void create_trapezoid_curve(MutableSpan<float3> positions, const float bottom, @@ -140,10 +140,10 @@ static void create_trapezoid_curve(MutableSpan<float3> positions, const float offset, const float height) { - positions[0] = float3(bottom / 2.0f, -height / 2.0f, 0.0f); - positions[1] = float3(-bottom / 2.0f, -height / 2.0f, 0.0f); - positions[2] = float3(-top / 2.0f + offset, height / 2.0f, 0.0f); - positions[3] = float3(top / 2.0f + offset, height / 2.0f, 0.0f); + positions[0] = float3(top / 2.0f + offset, height / 2.0f, 0.0f); + positions[1] = float3(-top / 2.0f + offset, height / 2.0f, 0.0f); + positions[2] = float3(-bottom / 2.0f, -height / 2.0f, 0.0f); + positions[3] = float3(bottom / 2.0f, -height / 2.0f, 0.0f); } static void create_kite_curve(MutableSpan<float3> positions, @@ -151,10 +151,10 @@ static void create_kite_curve(MutableSpan<float3> positions, const float bottom_height, const float top_height) { - positions[0] = float3(-width / 2.0f, 0, 0); - positions[1] = float3(0, top_height, 0); - positions[2] = float3(width / 2, 0, 0); - positions[3] = float3(0, -bottom_height, 0); + positions[0] = float3(0, -bottom_height, 0); + positions[1] = float3(width / 2, 0, 0); + positions[2] = float3(0, top_height, 0); + positions[3] = float3(-width / 2.0f, 0, 0); } static void geo_node_curve_primitive_quadrilateral_exec(GeoNodeExecParams params) diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_to_mesh.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_to_mesh.cc index ebaae59fbd6..b0c763c7d06 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_to_mesh.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_to_mesh.cc @@ -164,16 +164,16 @@ static void spline_extrude_to_mesh_data(const Spline &spline, MLoop &loop_a = r_loops[ring_segment_loop_offset]; loop_a.v = ring_vert_offset + i_profile; - loop_a.e = spline_edge_start + i_ring; + loop_a.e = ring_edge_start + i_profile; MLoop &loop_b = r_loops[ring_segment_loop_offset + 1]; - loop_b.v = next_ring_vert_offset + i_profile; - loop_b.e = next_ring_edge_offset + i_profile; + loop_b.v = ring_vert_offset + i_next_profile; + loop_b.e = next_spline_edge_start + i_ring; MLoop &loop_c = r_loops[ring_segment_loop_offset + 2]; loop_c.v = next_ring_vert_offset + i_next_profile; - loop_c.e = next_spline_edge_start + i_ring; + loop_c.e = next_ring_edge_offset + i_profile; MLoop &loop_d = r_loops[ring_segment_loop_offset + 3]; - loop_d.v = ring_vert_offset + i_next_profile; - loop_d.e = ring_edge_start + i_profile; + loop_d.v = next_ring_vert_offset + i_profile; + loop_d.e = spline_edge_start + i_ring; } } |