Struct physx::foundation::PxFoundation
source · [−]#[repr(transparent)]pub struct PxFoundation<Allocator: AllocatorCallback> { /* private fields */ }
Expand description
A new type wrapper for PxFoundation. Parametrized by it’s Allocator type.
Trait Implementations
sourceimpl<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>,
sourcefn 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. Read more
sourcefn 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. Read more
sourceimpl<Allocator: AllocatorCallback> Drop for PxFoundation<Allocator>
impl<Allocator: AllocatorCallback> Drop for PxFoundation<Allocator>
sourceimpl<Allocator: AllocatorCallback> Foundation for PxFoundation<Allocator>
impl<Allocator: AllocatorCallback> Foundation for PxFoundation<Allocator>
type Allocator = Allocator
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. Read moresourceunsafe 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 moresourcefn 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: BitFlags<ErrorCode>)
fn set_error_level(&mut self, mask: BitFlags<ErrorCode>)
Set the error level.
sourcefn get_error_level(&self) -> BitFlags<ErrorCode>
fn get_error_level(&self) -> BitFlags<ErrorCode>
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.
impl<Allocator: AllocatorCallback + Send> Send for PxFoundation<Allocator>
impl<Allocator: AllocatorCallback + Sync> Sync for PxFoundation<Allocator>
Auto Trait Implementations
impl<Allocator> RefUnwindSafe for PxFoundation<Allocator>where
Allocator: RefUnwindSafe,
impl<Allocator> Unpin for PxFoundation<Allocator>where
Allocator: Unpin,
impl<Allocator> UnwindSafe for PxFoundation<Allocator>where
Allocator: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more