Wildmeshing Toolkit
Loading...
Searching...
No Matches
TupleAccessor.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "Accessor.hpp"
4
5
6namespace wmtk::attribute {
7
8
9template <typename MeshType, int Dim = Eigen::Dynamic>
11{
12public:
13 TupleAccessor(MeshType& m, const TypedAttributeHandle<int64_t>& handle);
14 TupleAccessor(const MeshType& m, const TypedAttributeHandle<int64_t>& handle);
15 template <int Dim2>
17
18 // Eigen::Map<VectorX<T>>
19 template <int D = Dim>
21 // Eigen::Map<const VectorX<T>>
22 template <int D = Dim>
24
25
26 const Tuple& const_scalar_attribute(const Tuple& t) const;
27 Tuple& scalar_attribute(const Tuple& t);
28
29 template <int D = Dim>
31 template <int D = Dim>
33
34 Eigen::Index dimension() const { return m_dimension; }
35
36private:
38 Eigen::Index m_dimension;
39};
40
41
42template <typename MeshType>
44template <typename MeshType>
45TupleAccessor(const MeshType& m, const TypedAttributeHandle<int64_t>& handle)
47
48} // namespace wmtk::attribute
49#include "TupleAccessor.hxx"
The Tuple is the basic navigation tool in our mesh data structure.
Definition Tuple.hpp:19
A CachingAccessor that uses tuples for accessing attributes instead of indices.
Definition Accessor.hpp:28
const Tuple & const_scalar_attribute(const Tuple &t) const
internal::ConstMapResult< Tuple, D > ConstMapResult
Eigen::Index dimension() const
Tuple & scalar_attribute(const Tuple &t)
MapResult< D > vector_attribute(const Tuple &t)
Accessor< int64_t, MeshType > m_base_accessor
ConstMapResult< D > const_vector_attribute(const Tuple &t) const
internal::MapResult< Tuple, D > MapResult
Handle that represents attributes for some mesh.
typename VectorResult< T, R >::MapType MapResult
the default map type used by attributes is a map of our vector type.
Definition MapTypes.hpp:21
typename VectorResult< T, R >::ConstMapType ConstMapResult
Definition MapTypes.hpp:23