1 #ifndef INCLUDE_UNITTESTS_OpenMeshVectorTest_HH
2 #define INCLUDE_UNITTESTS_OpenMeshVectorTest_HH
4 #include <gtest/gtest.h>
5 #include <Unittests/unittests_common.hh>
13 virtual void SetUp() {
19 virtual void TearDown() {
48 OpenMesh::Vec3d vec1(0.0,1.0,0.0);
49 OpenMesh::Vec3d vec2(1.0,0.0,0.0);
51 double area = 0.5 * cross(vec1,vec2).norm();
52 EXPECT_EQ(0.5f , area ) <<
"Wrong area in cross product function";
54 area = 0.5 * ( vec1 % vec2 ).norm();
55 EXPECT_EQ(0.5f , area ) <<
"Wrong area in cross product operator";
63 OpenMesh::Vec3d vec1(0.5,0.5,-0.5);
65 EXPECT_EQ( vec1.l8_norm() , 0.5f ) <<
"Wrong l8norm computation";
72 #endif // INCLUDE GUARD