pub struct Tlas {
pub(crate) shared: Arc<TlasShared>,
}
Expand description
Top Level Acceleration Structure (TLAS).
A TLAS contains a series of TLAS instances, which are a reference to a BLAS and a transformation matrix placing the geometry in the world.
A TLAS contains TLAS instances in a device readable form, you cant interact directly with these, instead you have to build the TLAS with TLAS instances.
Fields§
Implementations§
Source§impl Tlas
impl Tlas
Sourcepub unsafe fn as_hal<A: HalApi, F: FnOnce(Option<&A::AccelerationStructure>) -> R, R>(
&mut self,
hal_tlas_callback: F,
) -> R
Available on wgpu_core
only.
pub unsafe fn as_hal<A: HalApi, F: FnOnce(Option<&A::AccelerationStructure>) -> R, R>( &mut self, hal_tlas_callback: F, ) -> R
wgpu_core
only.Returns the inner hal Acceleration Structure using a callback. The hal acceleration structure
will be None
if the backend type argument does not match with this wgpu Tlas
This method will start the wgpu_core level command recording.
§Safety
- The raw handle obtained from the hal Acceleration Structure must not be manually destroyed
- If the raw handle is build,
Sourcepub fn as_custom<T: TlasInterface>(&self) -> Option<&T>
Available on custom
only.
pub fn as_custom<T: TlasInterface>(&self) -> Option<&T>
custom
only.Returns custom implementation of Tlas (if custom backend and is internally T)
Trait Implementations§
Source§impl Ord for Tlas
impl Ord for Tlas
Source§impl PartialOrd for Tlas
impl PartialOrd for Tlas
impl Eq for Tlas
Auto Trait Implementations§
impl Freeze for Tlas
impl !RefUnwindSafe for Tlas
impl Send for Tlas
impl Sync for Tlas
impl Unpin for Tlas
impl !UnwindSafe for Tlas
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.