public void Attach(EmbreeGeometry geometry, uint id) { EmbreeAPI.rtcAttachGeometryByID(Handle, geometry.Handle, id); m_device.CheckError("AddGeometry"); m_geometries.Add(id, geometry); }
public uint Attach(EmbreeGeometry geometry) { var id = EmbreeAPI.rtcAttachGeometry(Handle, geometry.Handle); m_device.CheckError("AddGeometry"); m_geometries.Add(id, geometry); return(id); }
/// <summary> /// Single geometry instance /// </summary> public GeometryInstance(Device device, EmbreeGeometry geometry, Affine3f transform) : base(device, RTCGeometryType.Instance) { m_scene = EmbreeAPI.rtcNewScene(device.Handle); EmbreeAPI.rtcSetSceneFlags(m_scene, RTCSceneFlags.Robust | RTCSceneFlags.ContextFilterFunction); EmbreeAPI.rtcSetSceneBuildQuality(m_scene, RTCBuildQuality.High); EmbreeAPI.rtcAttachGeometry(m_scene, geometry.Handle); EmbreeAPI.rtcCommitScene(m_scene); EmbreeAPI.rtcSetGeometryInstancedScene(Handle, m_scene); EmbreeAPI.rtcSetGeometryTimeStepCount(Handle, 1); Transform = transform; Commit(); }