| 790 | : VerifyApplication::Test(name,isa,VerifyApplication::TEST_SHOULD_PASS), gtype(gtype) {} |
| 791 | |
| 792 | VerifyApplication::TestReturnValue run(VerifyApplication* state, bool silent) |
| 793 | { |
| 794 | std::string cfg = state->rtcore + ",isa="+stringOfISA(isa); |
| 795 | RTCDeviceRef device = rtcNewDevice(cfg.c_str()); |
| 796 | errorHandler(nullptr,rtcGetDeviceError(device)); |
| 797 | VerifyScene scene(device,SceneFlags(RTC_SCENE_FLAG_NONE,RTC_BUILD_QUALITY_MEDIUM)); |
| 798 | AssertNoError(device); |
| 799 | |
| 800 | Ref<SceneGraph::Node> node = nullptr; |
| 801 | switch (gtype) { |
| 802 | case TRIANGLE_MESH : node = SceneGraph::createTriangleSphere(zero,1.0f,50); break; |
| 803 | case TRIANGLE_MESH_MB: node = SceneGraph::createTriangleSphere(zero,1.0f,5)->set_motion_vector(Vec3fa(1.0f)); break; |
| 804 | case QUAD_MESH : node = SceneGraph::createQuadSphere(zero,1.0f,50); break; |
| 805 | case QUAD_MESH_MB : node = SceneGraph::createQuadSphere(zero,1.0f,50)->set_motion_vector(Vec3fa(1.0f)); break; |
| 806 | case GRID_MESH : node = SceneGraph::createGridSphere(zero,1.0f,50); break; |
| 807 | case GRID_MESH_MB : node = SceneGraph::createGridSphere(zero,1.0f,50)->set_motion_vector(Vec3fa(1.0f)); break; |
| 808 | //case SUBDIV_MESH: |
| 809 | //case SUBDIV_MESH_MB: |
| 810 | default: return VerifyApplication::SKIPPED; |
| 811 | } |
| 812 | |
| 813 | BBox3fa bounds0 = node->bounds(); |
| 814 | scene.addGeometry(RTC_BUILD_QUALITY_MEDIUM,node); |
| 815 | AssertNoError(device); |
| 816 | rtcCommitScene (scene); |
| 817 | AssertNoError(device); |
| 818 | BBox3fa bounds1; |
| 819 | rtcGetSceneBounds(scene,(RTCBounds*)&bounds1); |
| 820 | AssertNoError(device); |
| 821 | return (VerifyApplication::TestReturnValue)(bounds0 == bounds1); |
| 822 | } |
| 823 | }; |
| 824 | |
| 825 | struct GetLinearBoundsTest : public VerifyApplication::Test |
nothing calls this directly
no test coverage detected