56 #ifndef OSG_MODQUADRIC_HH 57 #define OSG_MODQUADRIC_HH 64 #include <OpenMesh/Core/Utils/Property.hh> 65 #include <OpenMesh/Core/Utils/vector_cast.hh> 82 template <
class MeshT>
100 Base::mesh().add_property( quadrics_ );
107 Base::mesh().remove_property(quadrics_);
127 Q q = Base::mesh().property(quadrics_, _ci.
v0);
128 q += Base::mesh().property(quadrics_, _ci.
v1);
130 double err = q(_ci.
p1);
137 return float( (err < max_err_) ? err :
float( Base::ILLEGAL_COLLAPSE ) );
144 Base::mesh().property(quadrics_, _ci.
v1) +=
145 Base::mesh().property(quadrics_, _ci.
v0);
164 Base::set_binary(_binary);
172 Base::set_binary(
false);
192 #if defined(OM_INCLUDE_TEMPLATES) && !defined(OPENMESH_DECIMATER_MODQUADRIC_CC) 193 #define OSG_MODQUADRIC_TEMPLATES 197 #endif // OSG_MODQUADRIC_HH defined virtual void initialize(void)
Initalize the module and prepare the mesh for decimation.
double max_err() const
Return value of max. allowed error.
Mesh::VertexHandle v1
Remaining vertex.
Mesh::Point p1
Positions of remaining vertex.
virtual float collapse_priority(const CollapseInfo &_ci)
virtual void postprocess_collapse(const CollapseInfo &_ci)
Post-process halfedge collapse (accumulate quadrics)
Mesh::VertexHandle v0
Vertex to be removed.
Mesh decimation module computing collapse priority based on error quadrics.
ModQuadricT(MeshT &_mesh)
void set_max_err(double _err, bool _binary=true)
virtual ~ModQuadricT()
Destructor.
void set_error_tolerance_factor(double _factor)
set the percentage of maximum quadric error