48 #include <Eigen/Dense> 49 #include <Eigen/Geometry> 53 template <
typename _Scalar,
int _Rows,
int _Cols,
int _Options>
55 static_assert(_Rows != Eigen::Dynamic && _Cols != Eigen::Dynamic,
56 "Should not use dynamic vectors.");
57 static_assert(_Rows == 1 || _Cols == 1,
"Should not use matrices.");
59 using vector_type = Eigen::Matrix<_Scalar, _Rows, _Cols, _Options>;
60 using value_type = _Scalar;
61 static const size_t size_ = _Rows * _Cols;
69 template <
typename Derived>
70 typename Derived::Scalar
dot(
const MatrixBase<Derived> &x,
71 const MatrixBase<Derived> &y) {
75 template <
typename Derived>
76 typename MatrixBase< Derived >::PlainObject
cross(
const MatrixBase<Derived> &x,
const MatrixBase<Derived> &y) {
80 template <
typename Derived>
81 typename Derived::Scalar norm(
const MatrixBase<Derived> &x) {
85 template <
typename Derived>
86 typename Derived::Scalar sqrnorm(
const MatrixBase<Derived> &x) {
90 template <
typename Derived>
91 MatrixBase<Derived> normalize(MatrixBase<Derived> &x) {
96 template <
typename Derived>
97 MatrixBase<Derived> &vectorize(MatrixBase<Derived> &x,
98 typename Derived::Scalar
const &val) {
osg::Vec3f::ValueType dot(const osg::Vec3f &_v1, const osg::Vec3f &_v2)
Adapter for osg vector member computing a scalar product.
Definition: VectorAdapter.hh:176
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:59
static size_t size()
size/dimension of the vector
Definition: vector_traits.hh:100
Definition: EigenVectorT.hh:67
Helper class providing information about a vector type.
Definition: vector_traits.hh:88
osg::Vec3f cross(const osg::Vec3f &_v1, const osg::Vec3f &_v2)
Adapter for osg vector member computing a scalar product.
Definition: VectorAdapter.hh:191
static const size_t size_
size/dimension of the vector
Definition: vector_traits.hh:97