9template <
typename MeshType,
int Dim>
13 : m_base_accessor(m, handle)
14 , m_dimension(m_base_accessor.dimension() / (sizeof(
Tuple) / sizeof(int64_t)))
16template <
typename MeshType,
int Dim>
22template <
typename MeshType,
int Dim>
28 static_assert(Dim == Eigen::Dynamic || Dim2 == Eigen::Dynamic || Dim == Dim2);
31template <
typename MeshType,
int Dim>
35 auto base_map = m_base_accessor.template const_vector_attribute<D>(t);
37 const int64_t* int_data = base_map.data();
38 const Tuple* data =
reinterpret_cast<const Tuple*
>(int_data);
42template <
typename MeshType,
int Dim>
46 auto base_map = m_base_accessor.template vector_attribute<D>(t);
47 int64_t* int_data = base_map.data();
48 Tuple* data =
reinterpret_cast<Tuple*
>(int_data);
52template <
typename MeshType,
int Dim>
55 auto base_map = m_base_accessor.template vector_attribute<2>(t);
57 assert(m_dimension == 1);
58 return *
reinterpret_cast<Tuple*
>(base_map.data());
61template <
typename MeshType,
int Dim>
64 assert(m_dimension == 1);
65 auto base_map = m_base_accessor.template const_vector_attribute<2>(t);
66 return *
reinterpret_cast<const Tuple*
>(base_map.data());
The Tuple is the basic navigation tool in our mesh data structure.
An Accessor that uses tuples for accessing attributes instead of indices.
const Tuple & const_scalar_attribute(const Tuple &t) const
TupleAccessor(MeshType &m, const TypedAttributeHandle< int64_t > &handle)
MapResult< Tuple, D > MapResult
ConstMapResult< Tuple, D > ConstMapResult
Tuple & scalar_attribute(const Tuple &t)
MapResult< D > vector_attribute(const Tuple &t)
ConstMapResult< D > const_vector_attribute(const Tuple &t) const
Handle that represents attributes for some mesh.