9#include <kernel/shape.hpp>
10#include <kernel/util/tiny_algebra.hpp>
11#include <kernel/adjacency/permutation.hpp>
35 typename Coord_ =
Real>
38 static_assert(num_coords_ > 0,
"invalid num_coords_ parameter");
55 template<
int sm_,
int sn_,
int sv_>
56 static void _aux_rot_mat(
63 template<
int sm_,
int sn_,
int sv_>
64 static void _aux_rot_mat(
71 template<
int sm_,
int sn_,
int sv_>
72 static void _aux_rot_mat(
82 explicit VertexSet(
const std::vector<VertexType>& vtx) :
117 _vertices = std::forward<std::vector<VertexType>>(
other._vertices);
132 template<
typename DT2_>
133 std::vector<Tiny::Vector<DT2_,num_coords>> clone_internal_vector()
const
135 std::vector<Tiny::Vector<DT2_,num_coords>> tmp(
_vertices.size());
136 for(std::size_t i = 0; i < std::size_t(
_vertices.size()); ++i)
246 _aux_rot_mat(rot, angles);
251 v.set_mat_vec_mult(rot, v - origin) += offset;
276 return "VertexSet<...>";
#define ASSERT(expr)
Debug-Assertion macro definition.
#define XASSERT(expr)
Assertion macro definition.
Index size() const
returns the size of the permutation
bool empty() const
Checks whether the permutation is empty.
void apply(Tx_ *x, bool invert=false) const
Applies In-Situ permutation.
String class implementation.
Tiny Matrix class template.
CUDA_HOST_DEVICE Matrix & set_rotation_3d(T_ yaw, T_ pitch, T_ roll)
Sets this matrix to a 3D yaw-pitch-roll rotation matrix.
CUDA_HOST_DEVICE Matrix & set_rotation_2d(T_ angle)
Sets this matrix to a 2D rotation matrix.
CUDA_HOST_DEVICE Matrix & set_identity()
Sets this matrix to the identity matrix.
Tiny Vector class template.
@ other
generic/other permutation strategy
double Real
Real data type.
std::uint64_t Index
Index data type.
Fixed-Sized Vertex Set class template.
Index get_num_vertices() const
Returns the number of vertices in the vertex set.
VertexSet(VertexSet &&other)
move constructor
static constexpr int num_coords
number of coordinates per vertex
void permute(const Adjacency::Permutation &perm, bool invert=false)
Applies a permutation onto this vertex set.
const VertexType & operator[](Index i) const
Returns a reference to a vertex.
VertexSet(const std::vector< VertexType > &vtx)
internal clone constructor
Coord_ CoordType
vertex coordinate type
std::size_t bytes() const
int get_num_coords() const
Returns the number of coordinates per vertex.
VertexType & operator[](Index i)
Returns a reference to a vertex.
const VertexType * end() const
Iterator to the first element.
const VertexType * begin() const
Iterator to the first element.
VertexSet()
standard constructor
VertexSet(Index num_vertices)
Constructor.
std::vector< VertexType > _vertices
vertex vector
VertexSet & operator=(VertexSet &&other)
move-assignment operator
VertexType * end()
Iterator past the last element.
void transform(const VertexType &origin, const VertexType &angles, const VertexType &offset)
Applies a "proper rigid" transformation onto the vertex set.
VertexType * begin()
Iterator to the first element.
virtual ~VertexSet()
virtual destructor
Tiny::Vector< CoordType, num_coords > VertexType
vertex type
static String name()
Returns the name of the class.