pub struct IntersectionFunctionDescriptor(/* private fields */);Expand description
Descriptor for creating intersection functions.
C++ equivalent: MTL::IntersectionFunctionDescriptor
Used to create intersection functions from a library. Inherits from FunctionDescriptor.
Implementations§
Source§impl IntersectionFunctionDescriptor
impl IntersectionFunctionDescriptor
Sourcepub fn alloc() -> Option<Self>
pub fn alloc() -> Option<Self>
Allocate a new intersection function descriptor.
C++ equivalent: static IntersectionFunctionDescriptor* alloc()
Sourcepub fn init(&self) -> Option<Self>
pub fn init(&self) -> Option<Self>
Initialize an allocated intersection function descriptor.
C++ equivalent: IntersectionFunctionDescriptor* 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 intersection function descriptor object.
Sourcepub fn name(&self) -> Option<String>
pub fn name(&self) -> Option<String>
Get the function name.
C++ equivalent: NS::String* name() const
Sourcepub fn set_name(&self, name: &str)
pub fn set_name(&self, name: &str)
Set the function name.
C++ equivalent: void setName(const NS::String*)
Sourcepub fn specialized_name(&self) -> Option<String>
pub fn specialized_name(&self) -> Option<String>
Get the specialized name.
C++ equivalent: NS::String* specializedName() const
Sourcepub fn set_specialized_name(&self, name: &str)
pub fn set_specialized_name(&self, name: &str)
Set the specialized name.
C++ equivalent: void setSpecializedName(const NS::String*)
Sourcepub fn constant_values(&self) -> Option<FunctionConstantValues>
pub fn constant_values(&self) -> Option<FunctionConstantValues>
Get the function constant values.
C++ equivalent: FunctionConstantValues* constantValues() const
Sourcepub fn set_constant_values(&self, values: Option<&FunctionConstantValues>)
pub fn set_constant_values(&self, values: Option<&FunctionConstantValues>)
Set the function constant values.
C++ equivalent: void setConstantValues(const FunctionConstantValues*)
Sourcepub fn options(&self) -> FunctionOptions
pub fn options(&self) -> FunctionOptions
Get the function options.
C++ equivalent: FunctionOptions options() const
Sourcepub fn set_options(&self, options: FunctionOptions)
pub fn set_options(&self, options: FunctionOptions)
Set the function options.
C++ equivalent: void setOptions(FunctionOptions)
Sourcepub fn binary_archives_raw(&self) -> *mut c_void
pub fn binary_archives_raw(&self) -> *mut c_void
Get the binary archives (raw NSArray pointer).
C++ equivalent: NS::Array* binaryArchives() const
Sourcepub unsafe fn set_binary_archives_raw(&self, archives: *const c_void)
pub unsafe fn set_binary_archives_raw(&self, archives: *const c_void)
Set the binary archives.
C++ equivalent: void setBinaryArchives(const NS::Array*)
§Safety
The archives pointer must be a valid NSArray of BinaryArchive objects or null.