Commit deab5b9d authored by Mike Kremer's avatar Mike Kremer

Added some unit tests on half face normals.

git-svn-id: http://www.openvolumemesh.org/svnrepo/OpenVolumeMesh/trunk@205 66977474-1d4b-4f09-8fe9-267525286df2
parent b18b96f8
......@@ -554,18 +554,38 @@ TEST_F(PolyhedralMeshBase, VolumeMeshNormals) {
EXPECT_DOUBLE_EQ(n_z[1], n[1]);
EXPECT_DOUBLE_EQ(n_z[2], n[2]);
n = normals[HalfFaceHandle(1)];
EXPECT_DOUBLE_EQ(-n_z[0], n[0]);
EXPECT_DOUBLE_EQ(-n_z[1], n[1]);
EXPECT_DOUBLE_EQ(-n_z[2], n[2]);
// Should be negative x-axis
n = normals[FaceHandle(2)];
EXPECT_DOUBLE_EQ(-n_x[0], n[0]);
EXPECT_DOUBLE_EQ(-n_x[1], n[1]);
EXPECT_DOUBLE_EQ(-n_x[2], n[2]);
n = normals[HalfFaceHandle(4)];
EXPECT_DOUBLE_EQ(-n_x[0], n[0]);
EXPECT_DOUBLE_EQ(-n_x[1], n[1]);
EXPECT_DOUBLE_EQ(-n_x[2], n[2]);
n = normals[HalfFaceHandle(5)];
EXPECT_DOUBLE_EQ(n_x[0], n[0]);
EXPECT_DOUBLE_EQ(n_x[1], n[1]);
EXPECT_DOUBLE_EQ(n_x[2], n[2]);
// Should be negative y-axis
n = normals[FaceHandle(4)];
EXPECT_DOUBLE_EQ(-n_y[0], n[0]);
EXPECT_DOUBLE_EQ(-n_y[1], n[1]);
EXPECT_DOUBLE_EQ(-n_y[2], n[2]);
n = normals[HalfFaceHandle(9)];
EXPECT_DOUBLE_EQ(n_y[0], n[0]);
EXPECT_DOUBLE_EQ(n_y[1], n[1]);
EXPECT_DOUBLE_EQ(n_y[2], n[2]);
// Should be positive y-axis
n = normals[FaceHandle(5)];
EXPECT_DOUBLE_EQ(-n_y[0], n[0]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment