| 101 | } |
| 102 | |
| 103 | UTEST_F(DispatchFilterFlags, noFiltering) |
| 104 | { |
| 105 | // |
| 106 | // read-in the source-mesh from file |
| 107 | // |
| 108 | |
| 109 | mioReadOFF((std::string(MESHES_DIR) + "/benchmarks/src-mesh014.off").c_str(), |
| 110 | &utest_fixture->srcMesh.pVertices, |
| 111 | &utest_fixture->srcMesh.pFaceVertexIndices, |
| 112 | &utest_fixture->srcMesh.pFaceSizes, |
| 113 | &utest_fixture->srcMesh.numVertices, |
| 114 | &utest_fixture->srcMesh.numFaces); |
| 115 | |
| 116 | // |
| 117 | // read-in the cut-mesh from file |
| 118 | // |
| 119 | |
| 120 | mioReadOFF((std::string(MESHES_DIR) + "/benchmarks/cut-mesh014.off").c_str(), |
| 121 | &utest_fixture->cutMesh.pVertices, |
| 122 | &utest_fixture->cutMesh.pFaceVertexIndices, |
| 123 | &utest_fixture->cutMesh.pFaceSizes, |
| 124 | &utest_fixture->cutMesh.numVertices, |
| 125 | &utest_fixture->cutMesh.numFaces); |
| 126 | |
| 127 | ASSERT_EQ(mcDispatch(utest_fixture->context_, |
| 128 | MC_DISPATCH_VERTEX_ARRAY_DOUBLE, |
| 129 | // source mesh |
| 130 | utest_fixture->srcMesh.pVertices, |
| 131 | utest_fixture->srcMesh.pFaceVertexIndices, |
| 132 | utest_fixture->srcMesh.pFaceSizes, |
| 133 | utest_fixture->srcMesh.numVertices, |
| 134 | utest_fixture->srcMesh.numFaces, |
| 135 | // cut mesh |
| 136 | utest_fixture->cutMesh.pVertices, |
| 137 | utest_fixture->cutMesh.pFaceVertexIndices, |
| 138 | utest_fixture->cutMesh.pFaceSizes, |
| 139 | utest_fixture->cutMesh.numVertices, |
| 140 | utest_fixture->cutMesh.numFaces), |
| 141 | MC_NO_ERROR); |
| 142 | |
| 143 | McUint32 numConnectedComponents = 0; |
| 144 | ASSERT_EQ(mcGetConnectedComponents(utest_fixture->context_, MC_CONNECTED_COMPONENT_TYPE_ALL, 0, NULL, &numConnectedComponents), MC_NO_ERROR); |
| 145 | ASSERT_EQ(McUint32(12), numConnectedComponents); // including sealed, partially, unsealed, above, below, patches & seams |
| 146 | utest_fixture->connComps_.resize(numConnectedComponents); |
| 147 | ASSERT_EQ(mcGetConnectedComponents(utest_fixture->context_, MC_CONNECTED_COMPONENT_TYPE_ALL, (McUint32)utest_fixture->connComps_.size(), &utest_fixture->connComps_[0], NULL), MC_NO_ERROR); |
| 148 | |
| 149 | for (McUint32 i = 0; i < numConnectedComponents; ++i) { |
| 150 | McConnectedComponent cc = utest_fixture->connComps_[i]; |
| 151 | ASSERT_TRUE(cc != MC_NULL_HANDLE); |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | UTEST_F(DispatchFilterFlags, partialCutWithInsideSealing) |
| 156 | { |
nothing calls this directly
no test coverage detected