make is_polymesh / is_trimesh methods constexpr and add a ConnectivityTag typedef to help with tag dispatching

This commit is contained in:
Janis Born
2017-07-28 08:43:13 +02:00
parent d3e50aed63
commit f9a1cc930c
3 changed files with 64 additions and 6 deletions

View File

@@ -65,6 +65,7 @@
#include <OpenMesh/Core/Geometry/MathDefs.hh>
#include <OpenMesh/Core/Mesh/PolyConnectivity.hh>
#include <OpenMesh/Core/Mesh/FinalMeshItemsT.hh>
#include <OpenMesh/Core/Mesh/Tags.hh>
#include <vector>
@@ -100,11 +101,12 @@ public:
//--- item types ---
//@{
/// Determine whether this is a PolyMeshT or TriMeshT ( This function does not check the per face vertex count! It only checks if the datatype is PolyMeshT or TriMeshT )
/// Determine whether this is a PolyMeshT or TriMeshT (This function does not check the per face vertex count! It only checks if the datatype is PolyMeshT or TriMeshT)
static constexpr bool is_polymesh() { return true; }
static constexpr bool is_trimesh() { return false; }
using ConnectivityTag = TriConnectivityTag;
enum { IsPolyMesh = 1 };
enum { IsTriMesh = 0 };
static bool is_polymesh() { return true; }
static bool is_trimesh() { return false; }
//@}
/// \name Mesh Items