Trait physx::shape::Shape

source ·
pub trait Shape: Class<PxShape> + UserData {
    type Material: Material;

    // Provided methods
    unsafe fn from_raw(
        ptr: *mut PxShape,
        user_data: Self::UserData
    ) -> Option<Owner<Self>> { ... }
    fn get_user_data(&self) -> &Self::UserData { ... }
    fn get_user_data_mut(&mut self) -> &mut Self::UserData { ... }
    fn set_simulation_filter_data(
        &mut self,
        this_layers: CollisionLayers,
        other_layers: CollisionLayers,
        word3: u32,
        word4: u32
    ) { ... }
    fn get_simulation_filter_data(&self) -> PxFilterData { ... }
    fn set_query_filter_data(&mut self, this_layers: CollisionLayers) { ... }
    fn get_query_filter_data(&self) -> PxFilterData { ... }
    fn get_nb_materials(&self) -> u16 { ... }
    fn get_materials(&self) -> Vec<&Self::Material> { ... }
    fn get_materials_mut(&mut self) -> Vec<&mut Self::Material> { ... }
    fn set_flag(&mut self, flag: ShapeFlag, enable: bool) { ... }
    fn set_flags(&mut self, flags: ShapeFlags) { ... }
}

Required Associated Types§

Provided Methods§

source

unsafe fn from_raw( ptr: *mut PxShape, user_data: Self::UserData ) -> Option<Owner<Self>>

Safety

Owner’s own the pointer they wrap, using the pointer after dropping the Owner, or creating multiple Owners from the same pointer will cause UB. Use into_ptr to retrieve the pointer and consume the Owner without dropping the pointee.

source

fn get_user_data(&self) -> &Self::UserData

Get a reference to the user data.

source

fn get_user_data_mut(&mut self) -> &mut Self::UserData

Get a mutable reference to the user data.

source

fn set_simulation_filter_data( &mut self, this_layers: CollisionLayers, other_layers: CollisionLayers, word3: u32, word4: u32 )

Set the simulation (collision) filter of this shape

source

fn get_simulation_filter_data(&self) -> PxFilterData

Read the collision filter data of this shape

source

fn set_query_filter_data(&mut self, this_layers: CollisionLayers)

Set the query filter of this shape

source

fn get_query_filter_data(&self) -> PxFilterData

Read the query filter data of this shape

source

fn get_nb_materials(&self) -> u16

Get the number of materials associated with this shape

source

fn get_materials(&self) -> Vec<&Self::Material>

Get a vector of all materials associated with this shape

source

fn get_materials_mut(&mut self) -> Vec<&mut Self::Material>

Get a mut vector of all materials associated with this shape

source

fn set_flag(&mut self, flag: ShapeFlag, enable: bool)

Toggle a flag on this shape

source

fn set_flags(&mut self, flags: ShapeFlags)

Sets the flags on this shape to the specified bitset

Implementors§

source§

impl<U, M: Material> Shape for PxShape<U, M>

§

type Material = M