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

@@ -63,6 +63,7 @@
#include <OpenMesh/Core/System/config.h>
#include <OpenMesh/Core/Mesh/PolyMeshT.hh>
#include <OpenMesh/Core/Mesh/Tags.hh>
#include <vector>
@@ -103,11 +104,12 @@ public:
typedef PolyMeshT<Kernel> PolyMesh;
//@{
/// 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 false; }
static constexpr bool is_trimesh() { return true; }
using ConnectivityTag = TriConnectivityTag;
enum { IsPolyMesh = 0 };
enum { IsTriMesh = 1 };
static bool is_polymesh() { return false; }
static bool is_trimesh() { return true; }
//@}
//--- items ---