Wildmeshing Toolkit
Loading...
Searching...
No Matches
RawSimplex.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <array>
4#include <vector>
5#include <wmtk/Mesh.hpp>
6#include <wmtk/Tuple.hpp>
7
8namespace wmtk::simplex {
9class Simplex;
10class RawSimplexCollection;
11
20{
21public:
22 RawSimplex() = default;
23
24 RawSimplex(const Mesh& mesh, const std::vector<Tuple>& vertices);
25
26 RawSimplex(std::vector<int64_t>&& vertices);
27
28 RawSimplex(const Mesh& mesh, const Simplex& simplex);
29
30 int64_t dimension() const;
31
32 bool operator==(const RawSimplex& o) const;
33 bool operator<(const RawSimplex& o) const;
34
43 RawSimplex opposite_face(const int64_t excluded_id);
44
54 RawSimplex opposite_face(const Mesh& mesh, const Tuple& vertex);
55
66
71
72private:
73 std::vector<int64_t> m_vertices;
74};
75
76} // namespace wmtk::simplex
The Tuple is the basic navigation tool in our mesh data structure.
Definition Tuple.hpp:19
A meshless implementation of the simplex that just stores an array of ids.
std::vector< int64_t > m_vertices
bool operator==(const RawSimplex &o) const
RawSimplex opposite_face(const int64_t excluded_id)
Get the face opposite to the given vertex.
RawSimplexCollection faces()
Get all faces of the simplex.
int64_t dimension() const
bool operator<(const RawSimplex &o) const
std::vector< Tuple > vertices(const Mesh &m, const Simplex &simplex)