MCPcopy Create free account
hub / github.com/RenderKit/embree / run

Method run

tutorials/verify/verify.cpp:792–822  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 13

stringOfISAFunction · 0.85
rtcNewDeviceFunction · 0.85
errorHandlerFunction · 0.85
rtcGetDeviceErrorFunction · 0.85
SceneFlagsClass · 0.85
AssertNoErrorFunction · 0.85
rtcCommitSceneFunction · 0.85
rtcGetSceneBoundsFunction · 0.85
addGeometryMethod · 0.80
Vec3faClass · 0.50
c_strMethod · 0.45
set_motion_vectorMethod · 0.45

Tested by

no test coverage detected