[−][src]Struct embree::scene::Scene
A scene containing various geometry for rendering. Geometry
can be added and removed by attaching and detaching it, after
which the scene BVH can be built via commit
which will
return a CommittedScene
which can be used for ray queries.
Implementations
impl<'a> Scene<'a>
[src]
pub fn new(device: &'a Device) -> Scene<'_>
[src]
pub fn attach_geometry(&mut self, mesh: Geometry<'a>) -> u32
[src]
Attach a new geometry to the scene. Returns the scene local ID which can than be used to find the hit geometry from the ray ID member. A geometry can only be attached to one Scene at a time, per the Embree documentation. The geometry can be detached from the scene to move it to another one.
pub fn deattach_geometry(&mut self, id: u32) -> Option<Geometry<'a>>
[src]
Detach the geometry from the scene
pub fn get_geometry(&self, id: u32) -> Option<&Geometry<'a>>
[src]
Look up a geometry in the scene by the ID returned from attach_geometry
pub fn get_geometry_mut(&mut self, id: u32) -> Option<&mut Geometry<'a>>
[src]
Look up a geometry in the scene by the ID returned from attach_geometry
pub fn iter(&self) -> Iter<'_, u32, Geometry<'a>>
[src]
Get an iterator over the geometry map
pub fn iter_mut(&mut self) -> IterMut<'_, u32, Geometry<'a>>
[src]
Get an iterator over the geometry map
pub fn commit(&'a self) -> CommittedScene<'a>
[src]
Commit the scene to build the BVH on top of the geometry to allow
for ray tracing the scene. The returned CommittedScene
can be
used for intersection and occlusion tests. The Scene
can't
be modified while the CommittedScene
is active.
pub unsafe fn handle(&self) -> RTCScene
[src]
Get the underlying handle to the scene, e.g. for passing it to native code or ISPC kernels.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Scene<'a>
impl<'a> !Send for Scene<'a>
impl<'a> Unpin for Scene<'a>
impl<'a> UnwindSafe for Scene<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,