pub struct IntersectionFunctionTable(/* private fields */);Expand description
A table of intersection functions for ray tracing.
C++ equivalent: MTL::IntersectionFunctionTable
Inherits from Resource.
Implementations§
Source§impl IntersectionFunctionTable
impl IntersectionFunctionTable
Sourcepub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
pub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
Create an IntersectionFunctionTable from a raw pointer.
§Safety
The pointer must be a valid Metal intersection function table object.
Sourcepub fn gpu_resource_id(&self) -> ResourceID
pub fn gpu_resource_id(&self) -> ResourceID
Get the GPU resource ID for bindless access.
C++ equivalent: ResourceID gpuResourceID() const
Sourcepub fn set_buffer(&self, buffer: &Buffer, offset: UInteger, index: UInteger)
pub fn set_buffer(&self, buffer: &Buffer, offset: UInteger, index: UInteger)
Set a buffer at the specified index.
C++ equivalent: void setBuffer(const MTL::Buffer* buffer, NS::UInteger offset, NS::UInteger index)
Sourcepub fn set_buffers(
&self,
buffers: &[&Buffer],
offsets: &[UInteger],
range: Range,
)
pub fn set_buffers( &self, buffers: &[&Buffer], offsets: &[UInteger], range: Range, )
Set multiple buffers at a range of indices.
C++ equivalent: void setBuffers(const MTL::Buffer* const buffers[], const NS::UInteger offsets[], NS::Range range)
Sourcepub fn set_function(&self, function: &FunctionHandle, index: UInteger)
pub fn set_function(&self, function: &FunctionHandle, index: UInteger)
Set a function at the specified index.
C++ equivalent: void setFunction(const MTL::FunctionHandle* function, NS::UInteger index)
Sourcepub fn set_functions(&self, functions: &[&FunctionHandle], range: Range)
pub fn set_functions(&self, functions: &[&FunctionHandle], range: Range)
Set multiple functions at a range of indices.
C++ equivalent: void setFunctions(const MTL::FunctionHandle* const functions[], NS::Range range)
Sourcepub fn set_opaque_curve_intersection_function_at_index(
&self,
signature: IntersectionFunctionSignature,
index: UInteger,
)
pub fn set_opaque_curve_intersection_function_at_index( &self, signature: IntersectionFunctionSignature, index: UInteger, )
Set an opaque curve intersection function at the specified index.
C++ equivalent: void setOpaqueCurveIntersectionFunction(MTL::IntersectionFunctionSignature signature, NS::UInteger index)
Sourcepub fn set_opaque_curve_intersection_function_with_range(
&self,
signature: IntersectionFunctionSignature,
range: Range,
)
pub fn set_opaque_curve_intersection_function_with_range( &self, signature: IntersectionFunctionSignature, range: Range, )
Set an opaque curve intersection function for a range of indices.
C++ equivalent: void setOpaqueCurveIntersectionFunction(MTL::IntersectionFunctionSignature signature, NS::Range range)
Sourcepub fn set_opaque_triangle_intersection_function_at_index(
&self,
signature: IntersectionFunctionSignature,
index: UInteger,
)
pub fn set_opaque_triangle_intersection_function_at_index( &self, signature: IntersectionFunctionSignature, index: UInteger, )
Set an opaque triangle intersection function at the specified index.
C++ equivalent: void setOpaqueTriangleIntersectionFunction(MTL::IntersectionFunctionSignature signature, NS::UInteger index)
Sourcepub fn set_opaque_triangle_intersection_function_with_range(
&self,
signature: IntersectionFunctionSignature,
range: Range,
)
pub fn set_opaque_triangle_intersection_function_with_range( &self, signature: IntersectionFunctionSignature, range: Range, )
Set an opaque triangle intersection function for a range of indices.
C++ equivalent: void setOpaqueTriangleIntersectionFunction(MTL::IntersectionFunctionSignature signature, NS::Range range)
Sourcepub fn set_visible_function_table(
&self,
function_table: &VisibleFunctionTable,
buffer_index: UInteger,
)
pub fn set_visible_function_table( &self, function_table: &VisibleFunctionTable, buffer_index: UInteger, )
Set a visible function table at the specified buffer index.
C++ equivalent: void setVisibleFunctionTable(const MTL::VisibleFunctionTable* functionTable, NS::UInteger bufferIndex)
Sourcepub fn set_visible_function_tables(
&self,
function_tables: &[&VisibleFunctionTable],
buffer_range: Range,
)
pub fn set_visible_function_tables( &self, function_tables: &[&VisibleFunctionTable], buffer_range: Range, )
Set multiple visible function tables at a range of buffer indices.
C++ equivalent: void setVisibleFunctionTables(const MTL::VisibleFunctionTable* const functionTables[], NS::Range bufferRange)