| 830 | : VerifyApplication::Test(name,isa,VerifyApplication::TEST_SHOULD_PASS), gtype(gtype) {} |
| 831 | |
| 832 | VerifyApplication::TestReturnValue run(VerifyApplication* state, bool silent) |
| 833 | { |
| 834 | std::string cfg = state->rtcore + ",isa="+stringOfISA(isa); |
| 835 | RTCDeviceRef device = rtcNewDevice(cfg.c_str()); |
| 836 | errorHandler(nullptr,rtcGetDeviceError(device)); |
| 837 | VerifyScene scene(device,SceneFlags(RTC_SCENE_FLAG_NONE,RTC_BUILD_QUALITY_MEDIUM)); |
| 838 | AssertNoError(device); |
| 839 | |
| 840 | Ref<SceneGraph::Node> node = nullptr; |
| 841 | switch (gtype) { |
| 842 | case TRIANGLE_MESH : node = SceneGraph::createTriangleSphere(zero,1.0f,50); break; |
| 843 | case TRIANGLE_MESH_MB: node = SceneGraph::createTriangleSphere(zero,1.0f,50)->set_motion_vector(Vec3fa(1.0f)); break; |
| 844 | case QUAD_MESH : node = SceneGraph::createQuadSphere(zero,1.0f,50); break; |
| 845 | case QUAD_MESH_MB : node = SceneGraph::createQuadSphere(zero,1.0f,50)->set_motion_vector(Vec3fa(1.0f)); break; |
| 846 | case GRID_MESH : node = SceneGraph::createGridSphere(zero,1.0f,50); break; |
| 847 | case GRID_MESH_MB : node = SceneGraph::createGridSphere(zero,1.0f,50)->set_motion_vector(Vec3fa(1.0f)); break; |
| 848 | //case SUBDIV_MESH: |
| 849 | //case SUBDIV_MESH_MB: |
| 850 | default: return VerifyApplication::SKIPPED; |
| 851 | } |
| 852 | |
| 853 | LBBox3fa bounds0 = node->lbounds(); |
| 854 | scene.addGeometry(RTC_BUILD_QUALITY_MEDIUM,node); |
| 855 | AssertNoError(device); |
| 856 | rtcCommitScene (scene); |
| 857 | AssertNoError(device); |
| 858 | LBBox3fa bounds1; |
| 859 | rtcGetSceneLinearBounds(scene,(RTCLinearBounds*)&bounds1); |
| 860 | AssertNoError(device); |
| 861 | return (VerifyApplication::TestReturnValue)(bounds0 == bounds1); |
| 862 | } |
| 863 | }; |
| 864 | |
| 865 | struct GetUserDataTest : public VerifyApplication::Test |
nothing calls this directly
no test coverage detected