[][src]Trait physx::shape::Shape

pub trait Shape: Class<PxShape> + UserData {
    type Material: Material;
    pub unsafe fn from_raw(
        ptr: *mut PxShape,
        user_data: Self::UserData
    ) -> Option<Owner<Self>> { ... }
pub fn get_user_data(&self) -> &Self::UserData { ... }
pub fn get_user_data_mut(&mut self) -> &mut Self::UserData { ... }
pub fn set_simulation_filter_data(
        &mut self,
        this_layers: BitFlags<CollisionLayer>,
        other_layers: BitFlags<CollisionLayer>,
        word3: u32,
        word4: u32
    ) { ... }
pub fn get_simulation_filter_data(&self) -> PxFilterData { ... }
pub fn get_reference_count(&self) -> u32 { ... }
pub fn set_query_filter_data(
        &mut self,
        this_layers: BitFlags<CollisionLayer>
    ) { ... }
pub fn get_query_filter_data(&self) -> PxFilterData { ... }
pub fn get_nb_materials(&self) -> u16 { ... }
pub fn get_materials(&self) -> Vec<&Self::Material> { ... }
pub fn get_materials_mut(&mut self) -> Vec<&mut Self::Material> { ... }
pub fn set_flag(&mut self, flag: ShapeFlag, enable: bool) { ... } }

Associated Types

Loading content...

Provided methods

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

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.

pub fn get_user_data(&self) -> &Self::UserData[src]

Get a reference to the user data.

pub fn get_user_data_mut(&mut self) -> &mut Self::UserData[src]

Get a mutable reference to the user data.

pub fn set_simulation_filter_data(
    &mut self,
    this_layers: BitFlags<CollisionLayer>,
    other_layers: BitFlags<CollisionLayer>,
    word3: u32,
    word4: u32
)
[src]

Set the simulation (collision) filter of this shape

pub fn get_simulation_filter_data(&self) -> PxFilterData[src]

Read the collision filter data of this shape

pub fn get_reference_count(&self) -> u32[src]

Get the reference count

pub fn set_query_filter_data(&mut self, this_layers: BitFlags<CollisionLayer>)[src]

Set the query filter of this shape

pub fn get_query_filter_data(&self) -> PxFilterData[src]

Read the query filter data of this shape

pub fn get_nb_materials(&self) -> u16[src]

Get the number of materials associated with this shape

pub fn get_materials(&self) -> Vec<&Self::Material>[src]

Get a vector of all materials associated with this shape

pub fn get_materials_mut(&mut self) -> Vec<&mut Self::Material>[src]

Get a mut vector of all materials associated with this shape

pub fn set_flag(&mut self, flag: ShapeFlag, enable: bool)[src]

Toggle a flag on this shape

Loading content...

Implementors

impl<U, M: Material> Shape for PxShape<U, M>[src]

type Material = M

Loading content...