Struct physx::foundation::PxFoundation
source · #[repr(transparent)]pub struct PxFoundation<Allocator: AllocatorCallback> { /* private fields */ }
Expand description
A new type wrapper for PxFoundation.
Parametrized by its Allocator type.
Trait Implementations§
source§impl<P, Allocator: AllocatorCallback> Class<P> for PxFoundation<Allocator>where
PxFoundation: Class<P>,
impl<P, Allocator: AllocatorCallback> Class<P> for PxFoundation<Allocator>where PxFoundation: Class<P>,
source§fn as_ptr(&self) -> *const P
fn as_ptr(&self) -> *const P
Returns a raw const pointer to the wrapped type.
Retrieving a raw pointer is safe. However, pretty much any use of a raw pointer is unsafe.
In particular: this pointer should not be used to construct a second owning wrapper around the pointer.
source§fn as_mut_ptr(&mut self) -> *mut P
fn as_mut_ptr(&mut self) -> *mut P
Returns a raw mut pointer to the wrapped type.
Retrieving a raw pointer is safe. However, pretty much any use of a raw pointer is unsafe.
In particular: this pointer should not be used to construct a second owning wrapper around the pointer.
source§impl<Allocator: AllocatorCallback> Drop for PxFoundation<Allocator>
impl<Allocator: AllocatorCallback> Drop for PxFoundation<Allocator>
source§impl<Allocator: AllocatorCallback> Foundation for PxFoundation<Allocator>
impl<Allocator: AllocatorCallback> Foundation for PxFoundation<Allocator>
type Allocator = Allocator
source§fn 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.source§unsafe 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. Read moresource§fn get_error_callback(&mut self) -> Option<&mut PxErrorCallback>
fn get_error_callback(&mut self) -> Option<&mut PxErrorCallback>
Get the error callback.
source§fn set_error_level(&mut self, mask: ErrorCodes)
fn set_error_level(&mut self, mask: ErrorCodes)
Set the error level.
source§fn get_error_level(&self) -> ErrorCodes
fn get_error_level(&self) -> ErrorCodes
Get the error level.
source§fn get_allocator_callback(&mut self) -> Option<&mut Self::Allocator>
fn get_allocator_callback(&mut self) -> Option<&mut Self::Allocator>
Get the allocator callback.
source§fn get_report_allocation_names(&self) -> bool
fn get_report_allocation_names(&self) -> bool
Get whether allocation names are reported.
source§fn set_report_allocation_names(&mut self, value: bool)
fn set_report_allocation_names(&mut self, value: bool)
Set whether allocation names are reported.