pub struct Scene<'a> { /* private fields */ }
Expand description

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

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.

Detach the geometry from the scene

Look up a geometry in the scene by the ID returned from attach_geometry

Look up a geometry in the scene by the ID returned from attach_geometry

Get an iterator over the geometry map

Get an iterator over the geometry map

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.

Get the underlying handle to the scene, e.g. for passing it to native code or ISPC kernels.

Trait Implementations

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.