Struct AccelerationStructureBuildInfo

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

All information required to build an acceleration structure

Implementations§

Source§

impl<'a> AccelerationStructureBuildInfo<'a>

Source

pub fn new_build() -> Self

Create a build info struct for AS build operations

Source

pub fn new_update() -> Self

Create a build info struct for AS update operations

Source

pub fn set_type(self, ty: AccelerationStructureType) -> Self

Set the acceleration structure type

Source

pub fn flags(self, flags: BuildAccelerationStructureFlagsKHR) -> Self

Set the acceleration structure build flags

Source

pub fn mode(self, mode: BuildAccelerationStructureModeKHR) -> Self

Set the acceleration structure build mode

Source

pub fn src(self, src: &'a AccelerationStructure) -> Self

Set the source acceleration structure

Source

pub fn dst(self, dst: &'a AccelerationStructure) -> Self

Set the destination acceleration structure

Source

pub fn push_triangles( self, triangles: AccelerationStructureGeometryTrianglesData, ) -> Self

Add a triangle geometry to this acceleration structure

Source

pub fn push_aabbs( self, aabbs: AccelerationStructureGeometryAabbsDataKHR, flags: GeometryFlagsKHR, ) -> Self

Add an AABB geometry to this acceleration structure

Source

pub fn push_instances( self, instances: AccelerationStructureGeometryInstancesData, ) -> Self

Add instance geometry to this acceleration structure

Source

pub fn push_geometry(self, geometry: AccelerationStructureGeometryKHR) -> Self

Add any geoemtry to this acceleration structure

Source

pub fn scratch_data(self, data: impl Into<DeviceOrHostAddress>) -> Self

Set the scratch buffer device address used for the build operation

Source

pub fn push_range( self, primitive_count: u32, primitive_offset: u32, first_vertex: u32, transform_offset: u32, ) -> Self

Add a primitive range to this acceleration structure

Source

pub fn ty(&self) -> AccelerationStructureType

Get the acceleration structure type

Source

pub fn as_vulkan( &'a self, ) -> (AccelerationStructureBuildGeometryInfoKHR, &'a [AccelerationStructureBuildRangeInfoKHR])

Get the Vulkan structs describing this build info

Trait Implementations§

Source§

impl<'a> Default for AccelerationStructureBuildInfo<'a>

Source§

fn default() -> Self

Create a default acceleration structure build info

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.