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

Method run

tutorials/verify/verify.cpp:1784–1832  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1782 : VerifyApplication::Test("TriangleSplitRegression", isa, VerifyApplication::TEST_SHOULD_PASS) {}
1783
1784 VerifyApplication::TestReturnValue run(VerifyApplication* state, bool silent)
1785 {
1786 std::string cfg = state->rtcore + ",isa="+stringOfISA(isa) + ",max_spatial_split_replications=1.5,max_triangles_per_leaf=1";
1787 RTCDeviceRef device = rtcNewDevice(cfg.c_str());
1788 errorHandler(nullptr,rtcGetDeviceError(device));
1789 SceneFlags sflags = { RTC_SCENE_FLAG_NONE, RTC_BUILD_QUALITY_HIGH };
1790 VerifyScene scene(device,sflags);
1791 AssertNoError(device);
1792
1793 Ref<SceneGraph::TriangleMeshNode> mesh = new SceneGraph::TriangleMeshNode(nullptr, BBox1f(0, 1));
1794 mesh->triangles = {
1795 { 0,1,2 },
1796 { 3,4,5 },
1797 { 6,7,8 },
1798 { 6,7,8 },
1799 };
1800
1801 mesh->positions.push_back({});
1802 auto& pos = mesh->positions.front();
1803
1804 const float
1805 a = -6.4000024f, // Lower limit, matters for determining binning space
1806 b = 25.6f, // Needs to be very close to one of the binning positions so the classifiers disagree
1807 c = 34.f, // Just needs to be between b and d
1808 d = 57.6000022f; // Upper limit, matters for determining binning space
1809
1810 pos.push_back(Vec3fa(b, 0, 0));
1811 pos.push_back(Vec3fa(d, 0, 0));
1812 pos.push_back(Vec3fa(d, 1, 0));
1813
1814 pos.push_back(Vec3fa(b, 0, 0));
1815 pos.push_back(Vec3fa(c, 0, 0));
1816 pos.push_back(Vec3fa(c, 1, 0));
1817
1818 pos.push_back(Vec3fa(a, 0, 0));
1819 pos.push_back(Vec3fa(d, 0, 0));
1820 pos.push_back(Vec3fa(d, 1, 0));
1821
1822 auto geom = scene.addGeometry(RTC_BUILD_QUALITY_HIGH, mesh.dynamicCast<SceneGraph::Node>());
1823
1824 RTCGeometry hgeom = rtcGetGeometry(scene, geom);
1825 AssertNoError(device);
1826
1827 rtcEnableGeometry(hgeom);
1828 rtcCommitScene (scene);
1829 AssertNoError(device);
1830
1831 return VerifyApplication::PASSED;
1832 }
1833 };
1834
1835 struct UpdateTest : public VerifyApplication::IntersectTest

Callers

nothing calls this directly

Calls 11

stringOfISAFunction · 0.85
rtcNewDeviceFunction · 0.85
errorHandlerFunction · 0.85
rtcGetDeviceErrorFunction · 0.85
AssertNoErrorFunction · 0.85
rtcEnableGeometryFunction · 0.85
rtcCommitSceneFunction · 0.85
addGeometryMethod · 0.80
Vec3faClass · 0.50
c_strMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected