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§

source

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>>

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

source

fn get_error_callback(&mut self) -> Option<&mut PxErrorCallback>

Get the error callback.

source

fn set_error_level(&mut self, mask: ErrorCodes)

Set the error level.

source

fn get_error_level(&self) -> ErrorCodes

Get the error level.

source

fn get_allocator_callback(&mut self) -> Option<&mut Self::Allocator>

Get the allocator callback.

source

fn get_report_allocation_names(&self) -> bool

Get whether allocation names are reported.

source

fn set_report_allocation_names(&mut self, value: bool)

Set whether allocation names are reported.

Implementors§

source§

impl<Allocator: AllocatorCallback> Foundation for PxFoundation<Allocator>

§

type Allocator = Allocator