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

Function addMesh

tutorials/multi_instanced_geometry/scene.cpp:106–120  ·  view source on GitHub ↗

* Add a mesh to a scene. */

Source from the content-addressed store, hash-verified

104 * Add a mesh to a scene.
105 */
106void addMesh(RTCDevice device, RTCScene scene, const Mesh& mesh)
107{
108 if (mesh.numTriangles > 0)
109 {
110 RTCGeometry geom = makeTriangleMesh(device, mesh);
111 rtcAttachGeometry(scene, geom);
112 rtcReleaseGeometry(geom);
113 }
114 if (mesh.numQuads > 0)
115 {
116 RTCGeometry geom = makeQuadMesh(device, mesh);
117 rtcAttachGeometry(scene, geom);
118 rtcReleaseGeometry(geom);
119 }
120}
121
122/*
123 * Build a transformation matrix from individual vectors.

Callers 1

initializeSceneFunction · 0.85

Calls 4

makeTriangleMeshFunction · 0.85
rtcAttachGeometryFunction · 0.85
rtcReleaseGeometryFunction · 0.85
makeQuadMeshFunction · 0.85

Tested by

no test coverage detected