Developer Documentation
Loading...
Searching...
No Matches
Entities.hh
1
#pragma once
2
3
#include <OpenVolumeMesh/Config/Export.hh>
4
#include <type_traits>
5
#include <cstddef>
6
#include <cstdint>
7
8
namespace
OpenVolumeMesh {
9
10
enum class
EntityType :
uint8_t
{
11
Vertex, Edge, HalfEdge, Face, HalfFace, Cell,
Mesh
12
};
13
inline
static
const
size_t
n_entity_types = 7;
14
16
namespace
Entity {
17
struct
OVM_EXPORT
Vertex
{
static
EntityType type() {
return
EntityType::Vertex;}};
18
struct
OVM_EXPORT
Edge
{
static
EntityType type() {
return
EntityType::Edge;}};
19
struct
OVM_EXPORT
HalfEdge
{
static
EntityType type() {
return
EntityType::HalfEdge;}};
20
struct
OVM_EXPORT
Face
{
static
EntityType type() {
return
EntityType::Face;}};
21
struct
OVM_EXPORT
HalfFace
{
static
EntityType type() {
return
EntityType::HalfFace;}};
22
struct
OVM_EXPORT
Cell
{
static
EntityType type() {
return
EntityType::Cell;}};
23
struct
OVM_EXPORT
Mesh
{
static
EntityType type() {
return
EntityType::Mesh;}};
24
}
// namespace Entity
25
26
27
template
<
typename
T>
28
struct
is_entity
: std::false_type {};
29
30
template
<
typename
T>
31
inline
constexpr
bool
is_entity_v =
is_entity<T>::value
;
32
33
34
template
<>
struct
OVM_EXPORT
is_entity
<Entity::Vertex> : std::true_type {};
35
template
<>
struct
OVM_EXPORT
is_entity
<Entity::Edge> : std::true_type {};
36
template
<>
struct
OVM_EXPORT
is_entity
<Entity::HalfEdge> : std::true_type {};
37
template
<>
struct
OVM_EXPORT
is_entity
<Entity::Face> : std::true_type {};
38
template
<>
struct
OVM_EXPORT
is_entity
<Entity::HalfFace> : std::true_type {};
39
template
<>
struct
OVM_EXPORT
is_entity
<Entity::Cell> : std::true_type {};
40
template
<>
struct
OVM_EXPORT
is_entity
<Entity::
Mesh
> : std::true_type {};
41
42
}
// namespace OpenVolumeMesh
OpenMesh::TriMesh_ArrayKernelT< CustomTraits >
OpenMesh::IO::uint8_t
unsigned char uint8_t
Definition
SR_types.hh:80
OpenVolumeMesh::Entity::Cell
Definition
Entities.hh:22
OpenVolumeMesh::Entity::Edge
Definition
Entities.hh:18
OpenVolumeMesh::Entity::Face
Definition
Entities.hh:20
OpenVolumeMesh::Entity::HalfEdge
Definition
Entities.hh:19
OpenVolumeMesh::Entity::HalfFace
Definition
Entities.hh:21
OpenVolumeMesh::Entity::Mesh
Definition
Entities.hh:23
OpenVolumeMesh::Entity::Vertex
Definition
Entities.hh:17
OpenVolumeMesh::is_entity
Definition
Entities.hh:28
Type-OpenVolumeMesh
libs
OpenVolumeMesh
src
OpenVolumeMesh
Core
Entities.hh
Generated on Wed Jul 16 2025 14:44:35 for Developer Documentation by
1.9.8