pub struct AccelerationStructureGeometryDescriptor(/* private fields */);Expand description
Base descriptor for geometry in acceleration structures.
C++ equivalent: MTL::AccelerationStructureGeometryDescriptor
Implementations§
Source§impl AccelerationStructureGeometryDescriptor
impl AccelerationStructureGeometryDescriptor
Sourcepub fn new() -> Option<Self>
pub fn new() -> Option<Self>
Create a new geometry descriptor.
C++ equivalent: static AccelerationStructureGeometryDescriptor* alloc()->init()
Sourcepub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
pub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
Create from a raw pointer.
§Safety
The pointer must be a valid Metal acceleration structure geometry descriptor.
Sourcepub fn allow_duplicate_intersection_function_invocation(&self) -> bool
pub fn allow_duplicate_intersection_function_invocation(&self) -> bool
Get whether duplicate intersection function invocation is allowed.
C++ equivalent: bool allowDuplicateIntersectionFunctionInvocation() const
Sourcepub fn set_allow_duplicate_intersection_function_invocation(&self, allow: bool)
pub fn set_allow_duplicate_intersection_function_invocation(&self, allow: bool)
Set whether duplicate intersection function invocation is allowed.
C++ equivalent: void setAllowDuplicateIntersectionFunctionInvocation(bool)
Sourcepub fn intersection_function_table_offset(&self) -> UInteger
pub fn intersection_function_table_offset(&self) -> UInteger
Get the intersection function table offset.
C++ equivalent: NS::UInteger intersectionFunctionTableOffset() const
Sourcepub fn set_intersection_function_table_offset(&self, offset: UInteger)
pub fn set_intersection_function_table_offset(&self, offset: UInteger)
Set the intersection function table offset.
C++ equivalent: void setIntersectionFunctionTableOffset(NS::UInteger)
Sourcepub fn opaque(&self) -> bool
pub fn opaque(&self) -> bool
Get whether geometry is opaque.
C++ equivalent: bool opaque() const
Sourcepub fn set_opaque(&self, opaque: bool)
pub fn set_opaque(&self, opaque: bool)
Set whether geometry is opaque.
C++ equivalent: void setOpaque(bool)
Sourcepub fn set_label(&self, label: &str)
pub fn set_label(&self, label: &str)
Set the label.
C++ equivalent: void setLabel(const NS::String*)
Sourcepub fn primitive_data_buffer(&self) -> Option<Buffer>
pub fn primitive_data_buffer(&self) -> Option<Buffer>
Get the primitive data buffer.
C++ equivalent: Buffer* primitiveDataBuffer() const
Sourcepub fn set_primitive_data_buffer(&self, buffer: Option<&Buffer>)
pub fn set_primitive_data_buffer(&self, buffer: Option<&Buffer>)
Set the primitive data buffer.
C++ equivalent: void setPrimitiveDataBuffer(Buffer*)
Sourcepub fn primitive_data_buffer_offset(&self) -> UInteger
pub fn primitive_data_buffer_offset(&self) -> UInteger
Get the primitive data buffer offset.
C++ equivalent: NS::UInteger primitiveDataBufferOffset() const
Sourcepub fn set_primitive_data_buffer_offset(&self, offset: UInteger)
pub fn set_primitive_data_buffer_offset(&self, offset: UInteger)
Set the primitive data buffer offset.
C++ equivalent: void setPrimitiveDataBufferOffset(NS::UInteger)
Sourcepub fn primitive_data_element_size(&self) -> UInteger
pub fn primitive_data_element_size(&self) -> UInteger
Get the primitive data element size.
C++ equivalent: NS::UInteger primitiveDataElementSize() const
Sourcepub fn set_primitive_data_element_size(&self, size: UInteger)
pub fn set_primitive_data_element_size(&self, size: UInteger)
Set the primitive data element size.
C++ equivalent: void setPrimitiveDataElementSize(NS::UInteger)
Sourcepub fn primitive_data_stride(&self) -> UInteger
pub fn primitive_data_stride(&self) -> UInteger
Get the primitive data stride.
C++ equivalent: NS::UInteger primitiveDataStride() const
Sourcepub fn set_primitive_data_stride(&self, stride: UInteger)
pub fn set_primitive_data_stride(&self, stride: UInteger)
Set the primitive data stride.
C++ equivalent: void setPrimitiveDataStride(NS::UInteger)