This commit is contained in:
Jan Möbius
2019-05-28 13:39:03 +02:00
parent bd0901caa8
commit 87d2161c5d
26 changed files with 85 additions and 72 deletions

View File

@@ -85,7 +85,7 @@ public:
/** Constructor
* \internal
*/
ModQuadricT( MeshT &_mesh )
explicit ModQuadricT( MeshT &_mesh )
: Base(_mesh, false)
{
unset_max_err();
@@ -103,7 +103,7 @@ public:
public: // inherited
/// Initalize the module and prepare the mesh for decimation.
virtual void initialize(void);
virtual void initialize(void) override;
/** Compute collapse priority based on error quadrics.
*
@@ -138,7 +138,7 @@ public: // inherited
}
/// set the percentage of maximum quadric error
void set_error_tolerance_factor(double _factor);
void set_error_tolerance_factor(double _factor) override;

View File

@@ -96,7 +96,7 @@ struct RuleHandleT : public BaseHandle
protected:\
friend class CompositeT<mesh_type>; \
public: \
const char *type() const { return #classname; } \
const char *type() const override { return #classname; } \
typedef classname<mesh_type> Self; \
typedef RuleHandleT< Self > Handle

View File

@@ -242,7 +242,7 @@ public:
explicit FVc(M& _mesh) : Inherited(_mesh) { init_coeffs(50); }
void raise(typename M::VertexHandle& _vh, state_t _target_state);
void raise(typename M::VertexHandle& _vh, state_t _target_state) override;
MIPS_WARN_WA(Face) // avoid warning
MIPS_WARN_WA(Edge) // avoid warning
@@ -412,7 +412,7 @@ public:
explicit EVc(M& _mesh) : Inherited(_mesh) { init_coeffs(50); }
void raise(typename M::VertexHandle& _vh, state_t _target_state);
void raise(typename M::VertexHandle& _vh, state_t _target_state) override;
MIPS_WARN_WA(Face) // avoid warning
MIPS_WARN_WA(Edge) // avoid warning

View File

@@ -114,15 +114,15 @@ public:
public:
const char *name() const { return "Uniform CatmullClark"; }
const char *name() const override { return "Uniform CatmullClark"; }
protected:
/// Initialize properties and weights
virtual bool prepare( MeshType& _m );
virtual bool prepare( MeshType& _m ) override;
/// Remove properties and weights
virtual bool cleanup( MeshType& _m );
virtual bool cleanup( MeshType& _m ) override;
/** \brief Execute n subdivision steps
*
@@ -131,7 +131,7 @@ protected:
* @param _update_points Unused here
* @return successful?
*/
virtual bool subdivide( MeshType& _m, size_t _n , const bool _update_points = true);
virtual bool subdivide( MeshType& _m, size_t _n , const bool _update_points = true) override;
private:

View File

@@ -102,13 +102,13 @@ public:
public: // inherited interface
virtual const char *name( void ) const = 0;
virtual const char *name( void ) const override = 0;
protected: // inherited interface
bool prepare( MeshType& _m );
bool prepare( MeshType& _m ) override;
bool subdivide( MeshType& _m, size_t _n, const bool _update_points = true )
bool subdivide( MeshType& _m, size_t _n, const bool _update_points = true ) override
{
assert( p_mesh_ == &_m );
@@ -124,7 +124,7 @@ protected: // inherited interface
#ifdef NDEBUG
bool cleanup( MeshType& )
#else
bool cleanup( MeshType& _m )
bool cleanup( MeshType& _m ) override
#endif
{
assert( p_mesh_ == &_m );

View File

@@ -87,11 +87,11 @@ public:
public:
const char *name() const { return "Uniform Composite Loop"; }
const char *name() const override { return "Uniform Composite Loop"; }
protected: // inherited interface
void apply_rules(void)
void apply_rules(void) override
{
Inherited::Tvv4();
Inherited::VdE();
@@ -119,7 +119,7 @@ protected:
weights_.end(), compute_weight() );
}
double operator()(size_t _valence) { return weights_[_valence]; }
double operator()(size_t _valence) override { return weights_[_valence]; }
/// \internal
struct compute_weight

View File

@@ -87,11 +87,11 @@ public:
public:
const char *name() const { return "Uniform Composite Sqrt3"; }
const char *name() const override { return "Uniform Composite Sqrt3"; }
protected: // inherited interface
void apply_rules(void)
void apply_rules(void) override
{
Inherited::Tvv3();
Inherited::VF();
@@ -117,7 +117,7 @@ protected:
weights_.end(), compute_weight() );
}
double operator()(size_t _valence) { return weights_[_valence]; }
double operator()(size_t _valence) override { return weights_[_valence]; }
/** \internal
*/

View File

@@ -116,7 +116,7 @@ public:
public:
const char *name() const { return "Uniform Loop"; }
const char *name() const override { return "Uniform Loop"; }
/// Pre-compute weights
@@ -130,7 +130,7 @@ public:
protected:
bool prepare( mesh_t& _m )
bool prepare( mesh_t& _m ) override
{
_m.add_property( vp_pos_ );
_m.add_property( ep_pos_ );
@@ -138,7 +138,7 @@ protected:
}
bool cleanup( mesh_t& _m )
bool cleanup( mesh_t& _m ) override
{
_m.remove_property( vp_pos_ );
_m.remove_property( ep_pos_ );
@@ -146,7 +146,7 @@ protected:
}
bool subdivide( mesh_t& _m, size_t _n, const bool _update_points = true)
bool subdivide( mesh_t& _m, size_t _n, const bool _update_points = true) override
{
///TODO:Implement fixed positions

View File

@@ -117,7 +117,7 @@ public:
public:
const char *name() const { return "Uniform Spectral"; }
const char *name() const override { return "Uniform Spectral"; }
/// Pre-compute weights
@@ -158,7 +158,7 @@ public:
protected:
bool prepare( mesh_t& _m )
bool prepare( mesh_t& _m ) override
{
_m.add_property( vp_pos_ );
_m.add_property( ep_pos_ );
@@ -166,7 +166,7 @@ protected:
}
bool cleanup( mesh_t& _m )
bool cleanup( mesh_t& _m ) override
{
_m.remove_property( vp_pos_ );
_m.remove_property( ep_pos_ );
@@ -174,7 +174,7 @@ protected:
}
bool subdivide( MeshType& _m, size_t _n , const bool _update_points = true)
bool subdivide( MeshType& _m, size_t _n , const bool _update_points = true) override
{
///TODO:Implement fixed positions

View File

@@ -128,7 +128,7 @@ public:
public:
const char *name() const { return "Uniform Interpolating Sqrt3"; }
const char *name() const override { return "Uniform Interpolating Sqrt3"; }
/// Pre-compute weights
void init_weights(size_t _max_valence=50)
@@ -170,7 +170,7 @@ public:
protected:
bool prepare( MeshType& _m )
bool prepare( MeshType& _m ) override
{
_m.request_edge_status();
_m.add_property( fp_pos_ );
@@ -183,7 +183,7 @@ protected:
}
bool cleanup( MeshType& _m )
bool cleanup( MeshType& _m ) override
{
_m.release_edge_status();
_m.remove_property( fp_pos_ );
@@ -193,7 +193,7 @@ protected:
}
bool subdivide( MeshType& _m, size_t _n , const bool _update_points = true)
bool subdivide( MeshType& _m, size_t _n , const bool _update_points = true) override
{
///TODO:Implement fixed positions

View File

@@ -121,7 +121,7 @@ public:
public:
const char *name() const { return "Uniform Sqrt3"; }
const char *name() const override { return "Uniform Sqrt3"; }
/// Pre-compute weights
@@ -135,7 +135,7 @@ public:
protected:
bool prepare( MeshType& _m )
bool prepare( MeshType& _m ) override
{
_m.request_edge_status();
_m.add_property( vp_pos_ );
@@ -148,7 +148,7 @@ protected:
}
bool cleanup( MeshType& _m )
bool cleanup( MeshType& _m ) override
{
_m.release_edge_status();
_m.remove_property( vp_pos_ );
@@ -157,7 +157,7 @@ protected:
return true;
}
bool subdivide( MeshType& _m, size_t _n , const bool _update_points = true)
bool subdivide( MeshType& _m, size_t _n , const bool _update_points = true) override
{
///TODO:Implement fixed positions

View File

@@ -152,7 +152,7 @@ public:
{}
#else
/// Construct with a given \c HeapIterface.
HeapT(const HeapInterface &_interface)
explicit HeapT(const HeapInterface &_interface)
: HeapVector(), interface_(_interface)
{}
#endif

View File

@@ -88,7 +88,7 @@ public:
/// Default constructor
StripifierT(Mesh& _mesh);
explicit StripifierT(Mesh& _mesh);
/// Destructor
~StripifierT();