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>
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
Base class for all decimation modules.
#define DECIMATING_MODULE(Classname, MeshT, Name)
Convenience macro, to be used in derived modules The macro defines the types.
Definition ModBaseT.hh:154
Bodies of template member function.
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition MeshItems.hh:64
Software related to mesh decimation.
/class QuadricT Geometry/QuadricT.hh
Definition QuadricT.hh:88
Handle representing a vertex property.
Definition Property.hh:488
ModBaseT(MeshT &_mesh, bool _is_binary)
Default constructor.
Definition ModBaseT.hh:212
ModQuadricT(MeshT &_mesh)
Constructor.
Definition ModQuadricT.hh:96
void set_error_tolerance_factor(double _factor)
set the percentage of maximum quadric error
Definition ModQuadricT.cc:141
void set_max_err(double _err, bool _binary=true)
Set maximum quadric error constraint and enable binary mode.
Definition ModQuadricT.hh:161
virtual ~ModQuadricT()
Destructor.
Definition ModQuadricT.hh:105
virtual void postprocess_collapse(const CollapseInfo &_ci)
Post-process halfedge collapse (accumulate quadrics)
Definition ModQuadricT.hh:142
double max_err() const
Return value of max. allowed error.
Definition ModQuadricT.hh:176
virtual void initialize(void)
Initalize the module and prepare the mesh for decimation.
Definition ModQuadricT.cc:78
void unset_max_err(void)
Definition ModQuadricT.hh:169
virtual float collapse_priority(const CollapseInfo &_ci)
Compute collapse priority based on error quadrics.
Definition ModQuadricT.hh:121