64 #ifndef OPENMESH_VECTOR_HH 65 #define OPENMESH_VECTOR_HH 71 #include <OpenMesh/Core/System/config.h> 77 #if defined(__GNUC__) && defined(__SSE__) 78 #include <xmmintrin.h> 101 template <
typename Scalar,
int N>
struct VectorDataT
107 #if defined(__GNUC__) && defined(__SSE__) 110 template <>
struct VectorDataT<float, 4>
128 #define TEMPLATE_HEADER template <typename Scalar, int N> 129 #define CLASSNAME VectorT 130 #define DERIVED VectorDataT<Scalar,N> 131 #define unroll(expr) for (int i=0; i<N; ++i) expr(i) 138 #include "VectorT_inc.hh" 141 #undef TEMPLATE_HEADER 150 #if OM_PARTIAL_SPECIALIZATION 153 #define TEMPLATE_HEADER template <typename Scalar> 154 #define CLASSNAME VectorT<Scalar,DIM> 155 #define DERIVED VectorDataT<Scalar,DIM> 159 #define unroll(expr) expr(0) expr(1) 160 #define unroll_comb(expr, op) expr(0) op expr(1) 161 #define unroll_csv(expr) expr(0), expr(1) 162 #include "VectorT_inc.hh" 170 #define unroll(expr) expr(0) expr(1) expr(2) 171 #define unroll_comb(expr, op) expr(0) op expr(1) op expr(2) 172 #define unroll_csv(expr) expr(0), expr(1), expr(2) 173 #include "VectorT_inc.hh" 181 #define unroll(expr) expr(0) expr(1) expr(2) expr(3) 182 #define unroll_comb(expr, op) expr(0) op expr(1) op expr(2) op expr(3) 183 #define unroll_csv(expr) expr(0), expr(1), expr(2), expr(3) 184 #include "VectorT_inc.hh" 191 #define unroll(expr) expr(0) expr(1) expr(2) expr(3) expr(4) 192 #define unroll_comb(expr, op) expr(0) op expr(1) op expr(2) op expr(3) op expr(4) 193 #define unroll_csv(expr) expr(0), expr(1), expr(2), expr(3), expr(4) 194 #include "VectorT_inc.hh" 201 #define unroll(expr) expr(0) expr(1) expr(2) expr(3) expr(4) expr(5) 202 #define unroll_comb(expr, op) expr(0) op expr(1) op expr(2) op expr(3) op expr(4) op expr(5) 203 #define unroll_csv(expr) expr(0), expr(1), expr(2), expr(3), expr(4), expr(5) 204 #include "VectorT_inc.hh" 211 #undef TEMPLATE_HEADER 228 values_[2]*_rhs.values_[0]-values_[0]*_rhs.values_[2],
229 values_[0]*_rhs.values_[1]-values_[1]*_rhs.values_[0]);
240 values_[2]*_rhs.values_[0]-values_[0]*_rhs.values_[2],
241 values_[0]*_rhs.values_[1]-values_[1]*_rhs.values_[0]);
253 template<
typename Scalar1,
typename Scalar2,
int N>
261 template<
typename Scalar,
int N>
270 template<
typename Scalar,
int N>
389 #endif // OPENMESH_VECTOR_HH defined osg::Vec3f::ValueType dot(const osg::Vec3f &_v1, const osg::Vec3f &_v2)
Adapter for osg vector member computing a scalar product.
Definition: VectorAdapter.hh:181
osg::Vec3f cross(const osg::Vec3f &_v1, const osg::Vec3f &_v2)
Adapter for osg vector member computing a scalar product.
Definition: VectorAdapter.hh:196
VectorT< Scalar, 3 > operator%(const VectorT< Scalar, 3 > &_rhs) const
cross product: only defined for Vec3* as specialization
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:64
Definition: VectorT_inc.hh:72