Trait physx::foundation::Foundation
source · pub trait Foundation: Class<PxFoundation> + Sized {
type Allocator: AllocatorCallback;
// Provided methods
fn new(allocator: Self::Allocator) -> Option<Owner<Self>> { ... }
unsafe fn with_allocator_error_callback(
allocator: Self::Allocator,
error_callback: *mut PxErrorCallback
) -> Option<Owner<Self>> { ... }
fn get_error_callback(&mut self) -> Option<&mut PxErrorCallback> { ... }
fn set_error_level(&mut self, mask: ErrorCodes) { ... }
fn get_error_level(&self) -> ErrorCodes { ... }
fn get_allocator_callback(&mut self) -> Option<&mut Self::Allocator> { ... }
fn get_report_allocation_names(&self) -> bool { ... }
fn set_report_allocation_names(&mut self, value: bool) { ... }
}
Required Associated Types§
Provided Methods§
sourcefn new(allocator: Self::Allocator) -> Option<Owner<Self>>
fn new(allocator: Self::Allocator) -> Option<Owner<Self>>
Tries to create a PxFoundation of the given version with the default allocator and error callbacks.
Returns None
if phys_PxCreateFoundation
returns a null pointer.
sourceunsafe fn with_allocator_error_callback(
allocator: Self::Allocator,
error_callback: *mut PxErrorCallback
) -> Option<Owner<Self>>
unsafe fn with_allocator_error_callback( allocator: Self::Allocator, error_callback: *mut PxErrorCallback ) -> Option<Owner<Self>>
Tries to create a PxFoundation with the provided allocator and error callbacks.
Returns None
if phys_PxCreateFoundation
returns a null pointer.
Safety
error_callback
must live as long as the returned Foundation
sourcefn get_error_callback(&mut self) -> Option<&mut PxErrorCallback>
fn get_error_callback(&mut self) -> Option<&mut PxErrorCallback>
Get the error callback.
sourcefn set_error_level(&mut self, mask: ErrorCodes)
fn set_error_level(&mut self, mask: ErrorCodes)
Set the error level.
sourcefn get_error_level(&self) -> ErrorCodes
fn get_error_level(&self) -> ErrorCodes
Get the error level.
sourcefn get_allocator_callback(&mut self) -> Option<&mut Self::Allocator>
fn get_allocator_callback(&mut self) -> Option<&mut Self::Allocator>
Get the allocator callback.
sourcefn get_report_allocation_names(&self) -> bool
fn get_report_allocation_names(&self) -> bool
Get whether allocation names are reported.
sourcefn set_report_allocation_names(&mut self, value: bool)
fn set_report_allocation_names(&mut self, value: bool)
Set whether allocation names are reported.