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

Method run

tutorials/verify/verify.cpp:832–862  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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
rtcGetSceneLinearBoundsFunction · 0.85
addGeometryMethod · 0.80
Vec3faClass · 0.50
c_strMethod · 0.45
set_motion_vectorMethod · 0.45

Tested by

no test coverage detected