4#include <Core/RaCore.hpp>
8#include <Eigen/Geometry>
9#include <OpenMesh/Core/Mesh/Traits.hh>
10#include <OpenMesh/Core/Mesh/TriMesh_ArrayKernelT.hh>
20template <
typename Derived>
21typename Derived::Scalar dot( Eigen::MatrixBase<Derived>
const& v1,
22 Eigen::MatrixBase<Derived>
const& v2 ) {
26template <
typename Derived>
27typename Derived::Scalar norm( Eigen::MatrixBase<Derived>
const& v1 ) {
31template <
typename Derived>
32Eigen::MatrixBase<Derived>& normalize( Eigen::MatrixBase<Derived>& v1 ) {
37template <
typename Derived>
38Eigen::MatrixBase<Derived>& vectorize( Eigen::MatrixBase<Derived>& v1, Scalar a ) {
43template <
typename Derived>
44typename Derived::Scalar sqrnorm( Eigen::MatrixBase<Derived>
const& v1 ) {
45 return v1.squaredNorm();
48template <
typename Derived>
49typename Derived::template cross_product_return_type<Derived>::type
50cross( Eigen::MatrixBase<Derived>
const& v1, Eigen::MatrixBase<Derived>
const& v2 ) {
51 return v1.cross( v2 );
57struct vector_traits<
Ra::Core::Vector3> {
58 using vector_type = Ra::Core::Vector3;
59 using value_type = Scalar;
60 static const size_t size_ = 3;
61 static size_t size() {
return 3; }
hepler function to manage enum as underlying types in VariableSet