Wildmeshing Toolkit
Primitive.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "PrimitiveType.hpp"
4 #include "Tuple.hpp"
5 
6 namespace wmtk {
7  class Cell;
8  namespace simplex {
9  class Simplex;
10  }
11 
12 class Primitive
13 {
16 
17 public:
18  Primitive(const PrimitiveType& primitive_type, const Tuple& t);
19  Primitive(const simplex::Simplex& simplex);
20  Primitive(const Cell& cell);
21 
23  const Tuple& tuple() const;
24 
25  static Primitive vertex(const Tuple& t);
26  static Primitive edge(const Tuple& t);
27  static Primitive face(const Tuple& t);
28  static Primitive tetrahedron(const Tuple& t);
29  static Primitive halfedge(const Tuple& t);
30 
31  bool operator==(const Primitive& o) const;
32  bool operator<(const Primitive& o) const;
33 };
34 } // namespace wmtk
bool operator<(const Primitive &o) const
Definition: Primitive.cpp:53
PrimitiveType m_primitive_type
Definition: Primitive.hpp:14
Primitive(const PrimitiveType &primitive_type, const Tuple &t)
Definition: Primitive.cpp:9
static Primitive edge(const Tuple &t)
Definition: Primitive.cpp:35
static Primitive face(const Tuple &t)
Definition: Primitive.cpp:39
bool operator==(const Primitive &o) const
Definition: Primitive.cpp:48
static Primitive vertex(const Tuple &t)
Definition: Primitive.cpp:31
static Primitive halfedge(const Tuple &t)
const Tuple & tuple() const
Definition: Primitive.cpp:26
static Primitive tetrahedron(const Tuple &t)
Definition: Primitive.cpp:43
PrimitiveType primitive_type() const
Definition: Primitive.cpp:22
Definition: Accessor.hpp:6