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: DeviceOrHostAddressA device or host address to memory containing vk::AabbPositionsKHR structures containing position data for each axis-aligned bounding box in the geometry.
stride: DeviceSizeStride 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: DeviceOrHostAddressEither 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.
Triangles
A triangle geometry in a bottom-level acceleration structure.
See VkAccelerationStructureGeometryTrianglesDataKHR for more information.
Fields
index_addr: DeviceOrHostAddressA device or host address to memory containing index data for this geometry.
index_type: IndexTypeThe VkIndexType of each index element.
max_vertex: u32The 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: DeviceOrHostAddressA device or host address to memory containing vertex data for this geometry.
vertex_stride: DeviceSizeThe stride in bytes between each vertex.
Implementations§
Source§impl AccelerationStructureGeometryData
impl AccelerationStructureGeometryData
Sourcepub fn aabbs(addr: impl Into<DeviceOrHostAddress>, stride: DeviceSize) -> Self
pub fn aabbs(addr: impl Into<DeviceOrHostAddress>, stride: DeviceSize) -> Self
Specifies acceleration structure geometry data as AABBs.
Sourcepub fn instances(addr: impl Into<DeviceOrHostAddress>) -> Self
pub fn instances(addr: impl Into<DeviceOrHostAddress>) -> Self
Specifies acceleration structure geometry data as instances.
Sourcepub fn instance_pointers(addr: impl Into<DeviceOrHostAddress>) -> Self
pub fn instance_pointers(addr: impl Into<DeviceOrHostAddress>) -> Self
Specifies acceleration structure geometry data as an array of instance pointers.
Sourcepub 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
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
impl Clone for AccelerationStructureGeometryData
Source§fn clone(&self) -> AccelerationStructureGeometryData
fn clone(&self) -> AccelerationStructureGeometryData
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl From<AccelerationStructureGeometryData> for AccelerationStructureGeometryDataKHR<'_>
impl From<AccelerationStructureGeometryData> for AccelerationStructureGeometryDataKHR<'_>
Source§fn from(value: AccelerationStructureGeometryData) -> Self
fn from(value: AccelerationStructureGeometryData) -> Self
Source§impl From<AccelerationStructureGeometryData> for GeometryTypeKHR
impl From<AccelerationStructureGeometryData> for GeometryTypeKHR
Source§fn from(value: AccelerationStructureGeometryData) -> Self
fn from(value: AccelerationStructureGeometryData) -> Self
Source§impl PartialEq for AccelerationStructureGeometryData
impl PartialEq for AccelerationStructureGeometryData
Source§fn eq(&self, other: &AccelerationStructureGeometryData) -> bool
fn eq(&self, other: &AccelerationStructureGeometryData) -> bool
self and other values to be equal, and is used by ==.