| 1216 | : VerifyApplication::Test(name,isa,VerifyApplication::TEST_SHOULD_PASS), sflags(sflags), quality(quality), N(N) {} |
| 1217 | |
| 1218 | VerifyApplication::TestReturnValue run(VerifyApplication* state, bool silent) |
| 1219 | { |
| 1220 | std::string cfg = state->rtcore + ",isa="+stringOfISA(isa); |
| 1221 | RTCDeviceRef device = rtcNewDevice(cfg.c_str()); |
| 1222 | errorHandler(nullptr,rtcGetDeviceError(device)); |
| 1223 | VerifyScene scene(device,sflags); |
| 1224 | AssertNoError(device); |
| 1225 | |
| 1226 | const Vec3fa p (0,0,0); |
| 1227 | const Vec3fa dx(1,0,0); |
| 1228 | const Vec3fa dy(0,1,0); |
| 1229 | |
| 1230 | Ref<SceneGraph::TriangleMeshNode> trimesh = SceneGraph::createTrianglePlane(p,dx,dy,1,1).dynamicCast<SceneGraph::TriangleMeshNode>(); |
| 1231 | for (size_t i=0; i<N; i++) trimesh->triangles.push_back(trimesh->triangles.back()); |
| 1232 | scene.addGeometry(quality,trimesh.dynamicCast<SceneGraph::Node>()); |
| 1233 | |
| 1234 | Ref<SceneGraph::TriangleMeshNode> trimesh2 = SceneGraph::createTrianglePlane(p,dx,dy,1,1)->set_motion_vector(random_motion_vector(1.0f)).dynamicCast<SceneGraph::TriangleMeshNode>(); |
| 1235 | for (size_t i=0; i<N; i++) trimesh2->triangles.push_back(trimesh2->triangles.back()); |
| 1236 | scene.addGeometry(quality,trimesh2.dynamicCast<SceneGraph::Node>()); |
| 1237 | |
| 1238 | Ref<SceneGraph::QuadMeshNode> quadmesh = SceneGraph::createQuadPlane(p,dx,dy,1,1).dynamicCast<SceneGraph::QuadMeshNode>(); |
| 1239 | for (size_t i=0; i<N; i++) quadmesh->quads.push_back(quadmesh->quads.back()); |
| 1240 | scene.addGeometry(quality,quadmesh.dynamicCast<SceneGraph::Node>()); |
| 1241 | |
| 1242 | Ref<SceneGraph::QuadMeshNode> quadmesh2 = SceneGraph::createQuadPlane(p,dx,dy,1,1)->set_motion_vector(random_motion_vector(1.0f)).dynamicCast<SceneGraph::QuadMeshNode>(); |
| 1243 | for (size_t i=0; i<N; i++) quadmesh2->quads.push_back(quadmesh2->quads.back()); |
| 1244 | scene.addGeometry(quality,quadmesh2.dynamicCast<SceneGraph::Node>()); |
| 1245 | |
| 1246 | Ref<SceneGraph::GridMeshNode> gridmesh = SceneGraph::createGridPlane(p,dx,dy,1,1).dynamicCast<SceneGraph::GridMeshNode>(); |
| 1247 | for (size_t i=0; i<N; i++) gridmesh->grids.push_back(gridmesh->grids.back()); |
| 1248 | scene.addGeometry(quality,gridmesh.dynamicCast<SceneGraph::Node>()); |
| 1249 | |
| 1250 | Ref<SceneGraph::GridMeshNode> gridmesh2 = SceneGraph::createGridPlane(p,dx,dy,1,1)->set_motion_vector(random_motion_vector(1.0f)).dynamicCast<SceneGraph::GridMeshNode>(); |
| 1251 | for (size_t i=0; i<N; i++) gridmesh2->grids.push_back(gridmesh2->grids.back()); |
| 1252 | scene.addGeometry(quality,gridmesh2.dynamicCast<SceneGraph::Node>()); |
| 1253 | |
| 1254 | Ref<SceneGraph::SubdivMeshNode> subdivmesh = new SceneGraph::SubdivMeshNode(nullptr,BBox1f(0,1),1); |
| 1255 | for (unsigned i=0; i<unsigned(N); i++) { |
| 1256 | subdivmesh->verticesPerFace.push_back(4); |
| 1257 | subdivmesh->position_indices.push_back(4*i+0); |
| 1258 | subdivmesh->position_indices.push_back(4*i+1); |
| 1259 | subdivmesh->position_indices.push_back(4*i+2); |
| 1260 | subdivmesh->position_indices.push_back(4*i+3); |
| 1261 | subdivmesh->positions[0].push_back(Vec3fa(0,0,0)); |
| 1262 | subdivmesh->positions[0].push_back(Vec3fa(0,1,0)); |
| 1263 | subdivmesh->positions[0].push_back(Vec3fa(1,1,0)); |
| 1264 | subdivmesh->positions[0].push_back(Vec3fa(1,0,0)); |
| 1265 | } |
| 1266 | scene.addGeometry(quality,subdivmesh.dynamicCast<SceneGraph::Node>()); |
| 1267 | |
| 1268 | Ref<SceneGraph::SubdivMeshNode> subdivmesh2 = new SceneGraph::SubdivMeshNode(nullptr,BBox1f(0,1),1); |
| 1269 | for (unsigned i=0; i<unsigned(N); i++) { |
| 1270 | subdivmesh2->verticesPerFace.push_back(4); |
| 1271 | subdivmesh2->position_indices.push_back(4*i+0); |
| 1272 | subdivmesh2->position_indices.push_back(4*i+1); |
| 1273 | subdivmesh2->position_indices.push_back(4*i+2); |
| 1274 | subdivmesh2->position_indices.push_back(4*i+3); |
| 1275 | subdivmesh2->positions[0].push_back(Vec3fa(0,0,0)); |
nothing calls this directly
no test coverage detected