Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

edge-collapse: garland-heckbert: no non-zero precondition for cost matrices #8345

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ class Probabilistic_plane_quadric_calculator
const Col_4& /*p0*/,
const Col_4& /*p1*/) const
{
// @fixme check this
// TODO: an all-zero matrix is just a specific case of a non-invertible matrix;
// shouldn't this rather assert that quadric is invertible?
CGAL_precondition(!quadric.isZero(0));

return construct_optimal_point_invertible<GeomTraits>(quadric);
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ class Probabilistic_triangle_quadric_calculator

Col_4 construct_optimal_point(const Mat_4& quadric, const Col_4& /*p0*/, const Col_4& /*p1*/) const
{
// @fixme check this
// TODO: an all-zero matrix is just a specific case of a non-invertible matrix;
// shouldn't this rather assert that quadric is invertible?
CGAL_precondition(!quadric.isZero(0));
return construct_optimal_point_invertible<GeomTraits>(quadric);
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,6 @@ class GarlandHeckbert_cost_and_placement
if(!placement)
return boost::optional<typename Profile::FT>();

CGAL_precondition(!get(vcm(), profile.v0()).isZero(0));
CGAL_precondition(!get(vcm(), profile.v1()).isZero(0));

const Mat_4 combined_matrix = combine_matrices(get(vcm(), profile.v0()),
get(vcm(), profile.v1()));
const Col_4 pt = point_to_homogenous_column(*placement);
Expand All @@ -224,9 +221,6 @@ class GarlandHeckbert_cost_and_placement
template <typename Profile>
boost::optional<typename Profile::Point> operator()(const Profile& profile) const
{
CGAL_precondition(!get(vcm(), profile.v0()).isZero(0));
CGAL_precondition(!get(vcm(), profile.v1()).isZero(0));

// the combined matrix has already been computed in the evaluation of the cost...
const Mat_4 combined_matrix = combine_matrices(get(vcm(), profile.v0()),
get(vcm(), profile.v1()));
Expand Down
Loading