Skip to main content

AccelerationStructureGeometryData

Enum AccelerationStructureGeometryData 

Source
pub enum AccelerationStructureGeometryData {
    AABBs {
        addr: DeviceOrHostAddress,
        stride: DeviceSize,
    },
    Instances {
        addr: DeviceOrHostAddress,
        array_of_pointers: bool,
    },
    Triangles {
        index_addr: DeviceOrHostAddress,
        index_type: IndexType,
        max_vertex: u32,
        transform_addr: Option<DeviceOrHostAddress>,
        vertex_addr: DeviceOrHostAddress,
        vertex_format: Format,
        vertex_stride: DeviceSize,
    },
}
Expand description

Specifies acceleration structure geometry data.

See VkAccelerationStructureGeometryDataKHR for more information.

Variants§

§

AABBs

Axis-aligned bounding box geometry in a bottom-level acceleration structure.

See VkAccelerationStructureGeometryAabbsDataKHR for more information.

Fields

§addr: DeviceOrHostAddress

A device or host address to memory containing vk::AabbPositionsKHR structures containing position data for each axis-aligned bounding box in the geometry.

§stride: DeviceSize

Stride in bytes between each entry in data.

The stride must be a multiple of 8.

§

Instances

Geometry consisting of instances of other acceleration structures.

See VkAccelerationStructureGeometryInstancesDataKHR for more information.

Fields

§addr: DeviceOrHostAddress

Either the address of an array of device referencing individual VkAccelerationStructureInstanceKHR structures or packed motion instance information as described in motion instances if array_of_pointers is true, or the address of an array of VkAccelerationStructureInstanceKHR structures.

Addresses and VkAccelerationStructureInstanceKHR structures are tightly packed.

§array_of_pointers: bool

Specifies whether data is used as an array of addresses or just an array.

§

Triangles

A triangle geometry in a bottom-level acceleration structure.

See VkAccelerationStructureGeometryTrianglesDataKHR for more information.

Fields

§index_addr: DeviceOrHostAddress

A device or host address to memory containing index data for this geometry.

§index_type: IndexType

The VkIndexType of each index element.

§max_vertex: u32

The highest index of a vertex that will be addressed by a build command using this structure.

§transform_addr: Option<DeviceOrHostAddress>

A device or host address to memory containing an optional reference to a VkTransformMatrixKHR structure describing a transformation from the space in which the vertices in this geometry are described to the space in which the acceleration structure is defined.

§vertex_addr: DeviceOrHostAddress

A device or host address to memory containing vertex data for this geometry.

§vertex_format: Format

The VkFormat of each vertex element.

§vertex_stride: DeviceSize

The stride in bytes between each vertex.

Implementations§

Source§

impl AccelerationStructureGeometryData

Source

pub fn aabbs(addr: impl Into<DeviceOrHostAddress>, stride: DeviceSize) -> Self

Specifies acceleration structure geometry data as AABBs.

Source

pub fn instances(addr: impl Into<DeviceOrHostAddress>) -> Self

Specifies acceleration structure geometry data as instances.

Source

pub fn instance_pointers(addr: impl Into<DeviceOrHostAddress>) -> Self

Specifies acceleration structure geometry data as an array of instance pointers.

Source

pub fn triangles( index_addr: impl Into<DeviceOrHostAddress>, index_type: IndexType, max_vertex: u32, transform_addr: impl Into<Option<DeviceOrHostAddress>>, vertex_addr: impl Into<DeviceOrHostAddress>, vertex_format: Format, vertex_stride: DeviceSize, ) -> Self

Specifies acceleration structure geometry data as triangles.

Trait Implementations§

Source§

impl Clone for AccelerationStructureGeometryData

Source§

fn clone(&self) -> AccelerationStructureGeometryData

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for AccelerationStructureGeometryData

Source§

impl Debug for AccelerationStructureGeometryData

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for AccelerationStructureGeometryData

Source§

impl From<AccelerationStructureGeometryData> for GeometryTypeKHR

Source§

fn from(value: AccelerationStructureGeometryData) -> Self

Converts to this type from the input type.
Source§

impl From<AccelerationStructureGeometryData> for AccelerationStructureGeometryDataKHR<'_>

Source§

fn from(value: AccelerationStructureGeometryData) -> Self

Converts to this type from the input type.
Source§

impl Hash for AccelerationStructureGeometryData

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for AccelerationStructureGeometryData

Source§

fn eq(&self, other: &AccelerationStructureGeometryData) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for AccelerationStructureGeometryData

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.