mirror of https://github.com/CGAL/cgal
Use DontAlign property for garland heckbert matrices
See discussion in: https://github.com/CGAL/cgal/pull/4279 Initial warning: https://cgal.geometryfactory.com/CGAL/testsuite/results-5.1-Ic-11.shtml#Surface_mesh_simplification_Examples
This commit is contained in:
parent
c9836ce5d7
commit
55bb46a383
|
|
@ -159,7 +159,8 @@ public:
|
||||||
typedef GeomTraits Geom_traits;
|
typedef GeomTraits Geom_traits;
|
||||||
typedef typename Geom_traits::FT FT;
|
typedef typename Geom_traits::FT FT;
|
||||||
|
|
||||||
typedef typename Eigen::Matrix<FT, 4, 4> Cost_matrix;
|
typedef typename internal::GarlandHeckbert_matrix_type<TriangleMesh,
|
||||||
|
GeomTraits>::type Cost_matrix;
|
||||||
typedef CGAL::dynamic_vertex_property_t<Cost_matrix> Cost_property;
|
typedef CGAL::dynamic_vertex_property_t<Cost_matrix> Cost_property;
|
||||||
typedef typename boost::property_map<TriangleMesh, Cost_property>::type Vertex_cost_map;
|
typedef typename boost::property_map<TriangleMesh, Cost_property>::type Vertex_cost_map;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,13 @@ namespace CGAL {
|
||||||
namespace Surface_mesh_simplification {
|
namespace Surface_mesh_simplification {
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
|
template<class TM_, typename GT_>
|
||||||
|
struct GarlandHeckbert_matrix_type
|
||||||
|
{
|
||||||
|
typedef typename GT_::FT FT;
|
||||||
|
typedef Eigen::Matrix<FT, 4, 4, Eigen::DontAlign> type;
|
||||||
|
};
|
||||||
|
|
||||||
template<class TM_, class VPM_, typename GT_>
|
template<class TM_, class VPM_, typename GT_>
|
||||||
struct GarlandHeckbert_core
|
struct GarlandHeckbert_core
|
||||||
{
|
{
|
||||||
|
|
@ -43,7 +50,7 @@ struct GarlandHeckbert_core
|
||||||
typedef typename Geom_traits::Plane_3 Plane_3;
|
typedef typename Geom_traits::Plane_3 Plane_3;
|
||||||
typedef typename Geom_traits::Vector_3 Vector_3;
|
typedef typename Geom_traits::Vector_3 Vector_3;
|
||||||
|
|
||||||
typedef Eigen::Matrix<FT, 4, 4> Matrix4x4;
|
typedef typename GarlandHeckbert_matrix_type<TM_, GT_>::type Matrix4x4;
|
||||||
typedef Eigen::Matrix<FT, 1, 4> Row4;
|
typedef Eigen::Matrix<FT, 1, 4> Row4;
|
||||||
typedef Eigen::Matrix<FT, 4, 1> Col4;
|
typedef Eigen::Matrix<FT, 4, 1> Col4;
|
||||||
|
|
||||||
|
|
@ -170,7 +177,7 @@ struct GarlandHeckbert_core
|
||||||
const Geom_traits& gt,
|
const Geom_traits& gt,
|
||||||
const FT discontinuity_multiplier = FT(100))
|
const FT discontinuity_multiplier = FT(100))
|
||||||
{
|
{
|
||||||
Matrix4x4 nq = Eigen::Matrix<FT, 4, 4>::Zero();
|
Matrix4x4 nq = Matrix4x4::Zero();
|
||||||
for(vertex_descriptor v : vertices(tmesh))
|
for(vertex_descriptor v : vertices(tmesh))
|
||||||
put(vcm, v, nq); // @todo is that necessary ?
|
put(vcm, v, nq); // @todo is that necessary ?
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue