63 #if (_MSC_VER >= 1900 || __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__)) && !defined(OPENMESH_VECTOR_LEGACY)
64 #include "Vector11T.hh"
68 #ifndef OPENMESH_VECTOR_HH
69 #define OPENMESH_VECTOR_HH
74 #include <OpenMesh/Core/System/config.h>
80 #if defined(__GNUC__) && defined(__SSE__)
81 #include <xmmintrin.h>
102 template<
typename Scalar,
int N>
class VectorDataT {
108 #if defined(__GNUC__) && defined(__SSE__)
111 template<>
class 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>
391 #endif // OPENMESH_VECTOR_HH defined
VectorT< signed int, 3 > Vec3i
3-int signed vector
Definition: Vector11T.hh:765
VectorT< unsigned short int, 1 > Vec1us
1-short unsigned vector
Definition: Vector11T.hh:729
VectorT< signed char, 1 > Vec1c
1-byte signed vector
Definition: Vector11T.hh:723
VectorT< float, 5 > Vec5f
5-float vector
Definition: Vector11T.hh:805
auto cross(const VectorT< LScalar, DIM > &_v1, const VectorT< RScalar, DIM > &_v2) -> decltype(_v1%_v2)
Definition: Vector11T.hh:707
VectorT< signed short int, 6 > Vec6s
6-short signed vector
Definition: Vector11T.hh:814
VectorT< double, 5 > Vec5d
5-double vector
Definition: Vector11T.hh:807
VectorT< double, 3 > Vec3d
3-double vector
Definition: Vector11T.hh:771
VectorT< signed short int, 1 > Vec1s
1-short signed vector
Definition: Vector11T.hh:727
auto operator*(const OtherScalar &_s, const VectorT< Scalar, DIM > &rhs) -> decltype(rhs.operator*(_s))
Component wise multiplication from the left.
Definition: Vector11T.hh:667
VectorT< float, 6 > Vec6f
6-float vector
Definition: Vector11T.hh:822
VectorT< unsigned int, 1 > Vec1ui
1-int unsigned vector
Definition: Vector11T.hh:733
VectorT< unsigned char, 3 > Vec3uc
3-byte unsigned vector
Definition: Vector11T.hh:759
VectorT< float, 3 > Vec3f
3-float vector
Definition: Vector11T.hh:769
VectorT< unsigned char, 4 > Vec4uc
4-byte unsigned vector
Definition: Vector11T.hh:778
VectorT< float, 1 > Vec1f
1-float vector
Definition: Vector11T.hh:735
VectorT< unsigned char, 5 > Vec5uc
5-byte unsigned vector
Definition: Vector11T.hh:795
VectorT< signed char, 6 > Vec6c
6-byte signed vector
Definition: Vector11T.hh:810
VectorT< unsigned char, 6 > Vec6uc
6-byte unsigned vector
Definition: Vector11T.hh:812
VectorT< unsigned char, 1 > Vec1uc
1-byte unsigned vector
Definition: Vector11T.hh:725
VectorT< signed short int, 3 > Vec3s
3-short signed vector
Definition: Vector11T.hh:761
VectorT< float, 4 > Vec4f
4-float vector
Definition: Vector11T.hh:788
VectorT< unsigned int, 3 > Vec3ui
3-int unsigned vector
Definition: Vector11T.hh:767
VectorT< signed int, 2 > Vec2i
2-int signed vector
Definition: Vector11T.hh:748
VectorT< unsigned short int, 4 > Vec4us
4-short unsigned vector
Definition: Vector11T.hh:782
VectorT< double, 4 > Vec4d
4-double vector
Definition: Vector11T.hh:790
VectorT< unsigned short int, 5 > Vec5us
5-short unsigned vector
Definition: Vector11T.hh:799
VectorT< unsigned int, 6 > Vec6ui
6-int unsigned vector
Definition: Vector11T.hh:820
VectorT< unsigned short int, 6 > Vec6us
6-short unsigned vector
Definition: Vector11T.hh:816
VectorT< double, 1 > Vec1d
1-double vector
Definition: Vector11T.hh:737
VectorT< signed char, 4 > Vec4c
4-byte signed vector
Definition: Vector11T.hh:776
VectorT< signed short int, 2 > Vec2s
2-short signed vector
Definition: Vector11T.hh:744
VectorT< signed short int, 4 > Vec4s
4-short signed vector
Definition: Vector11T.hh:780
VectorT< signed char, 3 > Vec3c
3-byte signed vector
Definition: Vector11T.hh:757
VectorT< bool, 3 > Vec3b
3-bool vector
Definition: Vector11T.hh:773
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:64
VectorT< signed int, 6 > Vec6i
6-int signed vector
Definition: Vector11T.hh:818
VectorT< signed char, 5 > Vec5c
5-byte signed vector
Definition: Vector11T.hh:793
VectorT< unsigned short int, 2 > Vec2us
2-short unsigned vector
Definition: Vector11T.hh:746
VectorT< signed int, 5 > Vec5i
5-int signed vector
Definition: Vector11T.hh:801
VectorT< signed short int, 5 > Vec5s
5-short signed vector
Definition: Vector11T.hh:797
Definition: VectorT_inc.hh:72
VectorT< double, 2 > Vec2d
2-double vector
Definition: Vector11T.hh:754
Scalar dot(const VectorT< Scalar, DIM > &_v1, const VectorT< Scalar, DIM > &_v2)
Definition: Vector11T.hh:699
VectorT< double, 6 > Vec6d
6-double vector
Definition: Vector11T.hh:824
VectorT< float, 2 > Vec2f
2-float vector
Definition: Vector11T.hh:752
VectorT< unsigned int, 5 > Vec5ui
5-int unsigned vector
Definition: Vector11T.hh:803
VectorT< unsigned int, 4 > Vec4ui
4-int unsigned vector
Definition: Vector11T.hh:786
VectorT< signed int, 1 > Vec1i
1-int signed vector
Definition: Vector11T.hh:731
VectorT< unsigned short int, 3 > Vec3us
3-short unsigned vector
Definition: Vector11T.hh:763
VectorT< signed char, 2 > Vec2c
2-byte signed vector
Definition: Vector11T.hh:740
VectorT< Scalar, 3 > operator%(const VectorT< Scalar, 3 > &_rhs) const
cross product: only defined for Vec3* as specialization
VectorT< unsigned char, 2 > Vec2uc
2-byte unsigned vector
Definition: Vector11T.hh:742
VectorT< signed int, 4 > Vec4i
4-int signed vector
Definition: Vector11T.hh:784
VectorT< unsigned int, 2 > Vec2ui
2-int unsigned vector
Definition: Vector11T.hh:750