Merge branch 'master' of gitlab.vci.rwth-aachen.de:OpenMesh/OpenMesh

This commit is contained in:
Jan Möbius
2024-01-09 13:00:03 +01:00
8 changed files with 26 additions and 54 deletions

View File

@@ -32,7 +32,7 @@ echo "CPPCHECK Summary"
echo "==============================================================================" echo "=============================================================================="
echo -e "${NC}" echo -e "${NC}"
MAX_COUNT=165 MAX_COUNT=162
if [ $COUNT -gt $MAX_COUNT ]; then if [ $COUNT -gt $MAX_COUNT ]; then
echo -e ${WARNING} echo -e ${WARNING}

View File

@@ -13,6 +13,10 @@
<li>Update Doxygen config format</li> <li>Update Doxygen config format</li>
</ul> </ul>
<b>Build System</b>
<ul>
<li>GTest is now automatically fetched via official git repository and build when unittests have been enabled</li>
</ul>
</tr> </tr>

View File

@@ -155,7 +155,7 @@ bool _OMReader_::read(std::istream& _is, BaseImporter& _bi, Options& _opt)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
bool _OMReader_::read_ascii(std::istream& /* _is */, BaseImporter& /* _bi */, Options& /* _opt */) const bool _OMReader_::read_ascii(std::istream& /* _is */, BaseImporter& /* _bi */, const Options& /* _opt */) const
{ {
// not supported yet! // not supported yet!
return false; return false;
@@ -164,7 +164,7 @@ bool _OMReader_::read_ascii(std::istream& /* _is */, BaseImporter& /* _bi */, Op
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
bool _OMReader_::read_binary(std::istream& _is, BaseImporter& _bi, Options& _opt) const bool _OMReader_::read_binary(std::istream& _is, BaseImporter& _bi, const Options& _opt) const
{ {
bool swap_required = _opt.check(Options::Swap) || (Endian::local() == Endian::MSB); bool swap_required = _opt.check(Options::Swap) || (Endian::local() == Endian::MSB);

View File

@@ -110,8 +110,8 @@ private:
bool supports( const OMFormat::uint8 version ) const; bool supports( const OMFormat::uint8 version ) const;
bool read_ascii(std::istream& _is, BaseImporter& _bi, Options& _opt) const; bool read_ascii(std::istream& _is, BaseImporter& _bi, const Options& _opt) const;
bool read_binary(std::istream& _is, BaseImporter& _bi, Options& _opt) const; bool read_binary(std::istream& _is, BaseImporter& _bi, const Options& _opt) const;
typedef OMFormat::Header Header; typedef OMFormat::Header Header;
typedef OMFormat::Chunk::Header ChunkHeader; typedef OMFormat::Chunk::Header ChunkHeader;

View File

@@ -64,14 +64,6 @@
#include <vector> #include <vector>
#if defined(OM_CC_MIPS) // avoid warnings
# define MIPS_WARN_WA( Item ) \
void raise(typename M:: ## Item ## Handle &_h, state_t _target_state ) \
{ Inherited::raise(_h, _target_state); }
#else
# define MIPS_WARN_WA( Item )
#endif
//== NAMESPACE ================================================================ //== NAMESPACE ================================================================
namespace OpenMesh { // BEGIN_NS_OPENMESH namespace OpenMesh { // BEGIN_NS_OPENMESH
@@ -103,7 +95,6 @@ public:
void raise(typename M::FaceHandle& _fh, state_t _target_state) override; void raise(typename M::FaceHandle& _fh, state_t _target_state) override;
void raise(typename M::VertexHandle& _vh, state_t _target_state) override; void raise(typename M::VertexHandle& _vh, state_t _target_state) override;
MIPS_WARN_WA(Edge) // avoid warning
}; };
@@ -155,8 +146,6 @@ public:
explicit VF(M& _mesh) : Inherited(_mesh) {} explicit VF(M& _mesh) : Inherited(_mesh) {}
void raise(typename M::FaceHandle& _fh, state_t _target_state) override; void raise(typename M::FaceHandle& _fh, state_t _target_state) override;
MIPS_WARN_WA(Edge)
MIPS_WARN_WA(Vertex)
}; };
@@ -177,8 +166,6 @@ public:
explicit FF(M& _mesh) : Inherited(_mesh) {} explicit FF(M& _mesh) : Inherited(_mesh) {}
void raise(typename M::FaceHandle& _fh, state_t _target_state) override; void raise(typename M::FaceHandle& _fh, state_t _target_state) override;
MIPS_WARN_WA(Vertex) // avoid warning
MIPS_WARN_WA(Edge ) // avoid warning
}; };
@@ -199,8 +186,6 @@ public:
explicit FFc(M& _mesh) : Inherited(_mesh) {} explicit FFc(M& _mesh) : Inherited(_mesh) {}
void raise(typename M::FaceHandle& _fh, state_t _target_state) override; void raise(typename M::FaceHandle& _fh, state_t _target_state) override;
MIPS_WARN_WA(Vertex) // avoid warning
MIPS_WARN_WA(Edge ) // avoid warning
}; };
@@ -221,8 +206,6 @@ public:
explicit FV(M& _mesh) : Inherited(_mesh) {} explicit FV(M& _mesh) : Inherited(_mesh) {}
void raise(typename M::VertexHandle& _vh, state_t _target_state) override; void raise(typename M::VertexHandle& _vh, state_t _target_state) override;
MIPS_WARN_WA(Face) // avoid warning
MIPS_WARN_WA(Edge) // avoid warning
}; };
@@ -243,8 +226,6 @@ public:
explicit FVc(M& _mesh) : Inherited(_mesh) { init_coeffs(50); } explicit FVc(M& _mesh) : Inherited(_mesh) { init_coeffs(50); }
void raise(typename M::VertexHandle& _vh, state_t _target_state) override; void raise(typename M::VertexHandle& _vh, state_t _target_state) override;
MIPS_WARN_WA(Face) // avoid warning
MIPS_WARN_WA(Edge) // avoid warning
static void init_coeffs(size_t _max_valence); static void init_coeffs(size_t _max_valence);
static const std::vector<double>& coeffs() { return coeffs_; } static const std::vector<double>& coeffs() { return coeffs_; }
@@ -280,8 +261,6 @@ public:
explicit VV(M& _mesh) : Inherited(_mesh) {} explicit VV(M& _mesh) : Inherited(_mesh) {}
void raise(typename M::VertexHandle& _vh, state_t _target_state) override; void raise(typename M::VertexHandle& _vh, state_t _target_state) override;
MIPS_WARN_WA(Face) // avoid warning
MIPS_WARN_WA(Edge) // avoid warning
}; };
@@ -302,8 +281,6 @@ public:
explicit VVc(M& _mesh) : Inherited(_mesh) {} explicit VVc(M& _mesh) : Inherited(_mesh) {}
void raise(typename M::VertexHandle& _vh, state_t _target_state) override; void raise(typename M::VertexHandle& _vh, state_t _target_state) override;
MIPS_WARN_WA(Face) // avoid warning
MIPS_WARN_WA(Edge) // avoid warning
}; };
@@ -324,8 +301,6 @@ public:
explicit VE(M& _mesh) : Inherited(_mesh) {} explicit VE(M& _mesh) : Inherited(_mesh) {}
void raise(typename M::EdgeHandle& _eh, state_t _target_state) override; void raise(typename M::EdgeHandle& _eh, state_t _target_state) override;
MIPS_WARN_WA(Face ) // avoid warning
MIPS_WARN_WA(Vertex) // avoid warning
}; };
@@ -346,8 +321,6 @@ public:
explicit VdE(M& _mesh) : Inherited(_mesh) {} explicit VdE(M& _mesh) : Inherited(_mesh) {}
void raise(typename M::EdgeHandle& _eh, state_t _target_state) override; void raise(typename M::EdgeHandle& _eh, state_t _target_state) override;
MIPS_WARN_WA(Face ) // avoid warning
MIPS_WARN_WA(Vertex) // avoid warning
}; };
@@ -368,8 +341,6 @@ public:
explicit VdEc(M& _mesh) : Inherited(_mesh) {} explicit VdEc(M& _mesh) : Inherited(_mesh) {}
void raise(typename M::EdgeHandle& _eh, state_t _target_state) override; void raise(typename M::EdgeHandle& _eh, state_t _target_state) override;
MIPS_WARN_WA(Face ) // avoid warning
MIPS_WARN_WA(Vertex) // avoid warning
}; };
@@ -390,8 +361,6 @@ public:
explicit EV(M& _mesh) : Inherited(_mesh) {} explicit EV(M& _mesh) : Inherited(_mesh) {}
void raise(typename M::VertexHandle& _vh, state_t _target_state) override; void raise(typename M::VertexHandle& _vh, state_t _target_state) override;
MIPS_WARN_WA(Face) // avoid warning
MIPS_WARN_WA(Edge) // avoid warning
}; };
@@ -413,8 +382,6 @@ public:
explicit EVc(M& _mesh) : Inherited(_mesh) { init_coeffs(50); } explicit EVc(M& _mesh) : Inherited(_mesh) { init_coeffs(50); }
void raise(typename M::VertexHandle& _vh, state_t _target_state) override; void raise(typename M::VertexHandle& _vh, state_t _target_state) override;
MIPS_WARN_WA(Face) // avoid warning
MIPS_WARN_WA(Edge) // avoid warning
static void init_coeffs(size_t _max_valence); static void init_coeffs(size_t _max_valence);
static const std::vector<double>& coeffs() { return coeffs_; } static const std::vector<double>& coeffs() { return coeffs_; }
@@ -449,8 +416,6 @@ public:
explicit EF(M& _mesh) : Inherited(_mesh) {} explicit EF(M& _mesh) : Inherited(_mesh) {}
void raise(typename M::FaceHandle& _fh, state_t _target_state) override; void raise(typename M::FaceHandle& _fh, state_t _target_state) override;
MIPS_WARN_WA(Edge ) // avoid warning
MIPS_WARN_WA(Vertex) // avoid warning
}; };
@@ -471,8 +436,6 @@ public:
explicit FE(M& _mesh) : Inherited(_mesh) {} explicit FE(M& _mesh) : Inherited(_mesh) {}
void raise(typename M::EdgeHandle& _eh, state_t _target_state) override; void raise(typename M::EdgeHandle& _eh, state_t _target_state) override;
MIPS_WARN_WA(Face ) // avoid warning
MIPS_WARN_WA(Vertex) // avoid warning
}; };
@@ -493,8 +456,6 @@ public:
explicit EdE(M& _mesh) : Inherited(_mesh) {} explicit EdE(M& _mesh) : Inherited(_mesh) {}
void raise(typename M::EdgeHandle& _eh, state_t _target_state) override; void raise(typename M::EdgeHandle& _eh, state_t _target_state) override;
MIPS_WARN_WA(Face ) // avoid warning
MIPS_WARN_WA(Vertex) // avoid warning
}; };
@@ -515,13 +476,10 @@ public:
explicit EdEc(M& _mesh) : Inherited(_mesh) {} explicit EdEc(M& _mesh) : Inherited(_mesh) {}
void raise(typename M::EdgeHandle& _eh, state_t _target_state) override; void raise(typename M::EdgeHandle& _eh, state_t _target_state) override;
MIPS_WARN_WA(Face ) // avoid warning
MIPS_WARN_WA(Vertex) // avoid warning
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#undef MIPS_WARN_WA
//============================================================================= //=============================================================================
} // END_NS_ADAPTIVE } // END_NS_ADAPTIVE

View File

@@ -166,8 +166,12 @@ protected:
/// \name Overload theses methods /// \name Overload theses methods
//@{ //@{
/// Prepare mesh, e.g. add properties /** \brief Prepare mesh, e.g. add properties
virtual bool prepare( MeshType& _m ) = 0; *
* You have to reimplement this function to setup your mesh. The default implementation
* will always return false and therefore block your algorithm.
*/
virtual bool prepare( MeshType& /*_m*/ ) { return false; };
/// Subdivide mesh \c _m \c _n times /// Subdivide mesh \c _m \c _n times
virtual bool subdivide( MeshType& _m, size_t _n, const bool _update_points = true) = 0; virtual bool subdivide( MeshType& _m, size_t _n, const bool _update_points = true) = 0;

View File

@@ -163,10 +163,10 @@ public:
~TimerImplPosix() ~TimerImplPosix()
{ } { }
virtual void reset(void) { seconds_ = 0.0; } virtual void reset(void) override { seconds_ = 0.0; }
virtual void start(void) { seconds_ = 0.0; clock_gettime( id_, &start_ ); } virtual void start(void) override { seconds_ = 0.0; clock_gettime( id_, &start_ ); }
virtual void stop(void) virtual void stop(void) override
{ {
timespec stop; timespec stop;
clock_gettime( id_, &stop ); clock_gettime( id_, &stop );
@@ -174,9 +174,9 @@ public:
seconds_ += ( (double(stop.tv_nsec-start_.tv_nsec)*1e-9) ); seconds_ += ( (double(stop.tv_nsec-start_.tv_nsec)*1e-9) );
} }
virtual void cont(void) { clock_gettime( id_, &start_ ); } virtual void cont(void) override { clock_gettime( id_, &start_ ); }
virtual double seconds() const { return seconds_; } virtual double seconds() override const { return seconds_; }
protected: protected:
clockid_t id_; clockid_t id_;

View File

@@ -98,8 +98,12 @@ public:
Timer(void); Timer(void);
/// Make the timer non copyable
Timer(const Timer& _other) = delete; Timer(const Timer& _other) = delete;
/// Make the timer non copyable
Timer& operator=( const Timer& ) = delete;
~Timer(void); ~Timer(void);
/// Returns true if self is in a valid state! /// Returns true if self is in a valid state!
@@ -144,6 +148,8 @@ public:
*/ */
static std::string as_string(double seconds, Format format = Automatic); static std::string as_string(double seconds, Format format = Automatic);
public: public:
//@{ //@{