21 template <
typename _Scalar,
int _Dim>
30 using VectorType = Eigen::Matrix<Scalar, Dim, 1>;
31 using MatrixType = Eigen::Matrix<Scalar, Dim, Dim>;
34 const VectorType&
normal = VectorType::Zero())
40 PONCA_MULTIARCH [[
nodiscard]]
inline const VectorType&
pos()
const {
return m_pos; }
42 PONCA_MULTIARCH [[
nodiscard]]
inline const VectorType&
normal()
const {
return m_normal; }
44 PONCA_MULTIARCH [[
nodiscard]]
inline VectorType&
pos() {
return m_pos; }
49 VectorType m_pos, m_normal;
55 template <
typename _Scalar,
int _Dim>
64 using VectorType = Eigen::Matrix<Scalar, Dim, 1>;
65 using MatrixType = Eigen::Matrix<Scalar, Dim, Dim>;
67 PONCA_MULTIARCH
inline PointPosition(
const VectorType&
pos = VectorType::Zero()) : m_pos(
pos) {}
70 PONCA_MULTIARCH [[
nodiscard]]
inline const VectorType&
pos()
const {
return m_pos; }
72 PONCA_MULTIARCH [[
nodiscard]]
inline VectorType&
pos() {
return m_pos; }
89 template <
typename _Scalar,
int _Dim>
98 using VectorType = Eigen::Matrix<Scalar, Dim, 1>;
99 using MatrixType = Eigen::Matrix<Scalar, Dim, Dim>;
108 PONCA_MULTIARCH [[
nodiscard]]
inline const Eigen::Map<const VectorType>&
pos()
const {
return m_pos; }
110 PONCA_MULTIARCH [[
nodiscard]]
inline const Eigen::Map<const VectorType>&
normal()
const {
return m_normal; }
113 const Eigen::Map<const VectorType> m_pos, m_normal;
128 template <
typename _Scalar,
int _Dim>
137 using VectorType = Eigen::Matrix<Scalar, Dim, 1>;
138 using MatrixType = Eigen::Matrix<Scalar, Dim, Dim>;
149 PONCA_MULTIARCH [[
nodiscard]]
inline Eigen::Map<const VectorType>
pos()
const
151 return Eigen::Map<const VectorType>(m_interlacedArray + Dim * 2 * m_id);
156 return Eigen::Map<const VectorType>(m_interlacedArray + Dim * 2 * m_id + Dim);
160 Scalar* m_interlacedArray;
Aggregator class used to declare specialized structures using CRTP.
Variant of the PointPositionNormal data type that uses external raw data.
const Eigen::Map< const VectorType > & normal() const
Get the point normal.
const Eigen::Map< const VectorType > & pos() const
Get the point position.
Variant of the PointPositionNormal data type that uses external raw data.
Eigen::Map< const VectorType > pos() const
Get the point position.
void bind(Scalar *_interlacedArray)
Allows change of reference.
Eigen::Map< const VectorType > normal() const
Get the point normal.
Point data type containing the position and normal vectors.
VectorType & normal()
Get the point normal.
const VectorType & pos() const
Get the point position.
const VectorType & normal() const
Get the point normal.
VectorType & pos()
Get the point position.
Point data type containing only containing the position vector.
const VectorType & pos() const
Get the point position.
VectorType & pos()
Get the point position.
This Source Code Form is subject to the terms of the Mozilla Public License, v.