Skip to content

Commit e9f6683

Browse files
committed
fix removing normal function fallback
1 parent a8d4cdc commit e9f6683

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

src/geode/geometry/basic_objects/triangle.cpp

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -184,28 +184,6 @@ namespace geode
184184
std::make_pair( result->pivot, result->normal )
185185
};
186186
}
187-
const auto max = absl::c_max_element( result->lengths );
188-
const local_index_t longest_e =
189-
std::distance( result->lengths.begin(), max );
190-
const Point3D& point0 = vertices_[longest_e];
191-
const auto e1 = longest_e == 2 ? 0 : longest_e + 1;
192-
const Point3D& point1 = vertices_[e1];
193-
const auto e2 = e1 == 2 ? 0 : e1 + 1;
194-
const Point3D& point2 = vertices_[e2];
195-
if( point_segment_distance( point2, { point0, point1 } )
196-
> GLOBAL_EPSILON )
197-
{
198-
const auto ratio = result->lengths[e2]
199-
/ ( result->lengths[e2] + result->lengths[e1] );
200-
const auto new_point = point0 * ( 1. - ratio ) + point1 * ratio;
201-
const auto result_left =
202-
simple_pivot_and_normal( { point0, new_point, point2 } );
203-
if( !result_left || result_left->pivot == NO_LID )
204-
{
205-
return std::nullopt;
206-
}
207-
return std::make_pair( e2, result_left->normal );
208-
}
209187
return std::nullopt;
210188
}
211189

0 commit comments

Comments
 (0)