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

@@ -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