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§
sourceunsafe fn from_raw(
ptr: *mut PxShape,
user_data: Self::UserData
) -> Option<Owner<Self>>
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.
sourcefn get_user_data(&self) -> &Self::UserData
fn get_user_data(&self) -> &Self::UserData
Get a reference to the user data.
sourcefn get_user_data_mut(&mut self) -> &mut Self::UserData
fn get_user_data_mut(&mut self) -> &mut Self::UserData
Get a mutable reference to the user data.
sourcefn set_simulation_filter_data(
&mut self,
this_layers: CollisionLayers,
other_layers: CollisionLayers,
word3: u32,
word4: u32
)
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
sourcefn get_simulation_filter_data(&self) -> PxFilterData
fn get_simulation_filter_data(&self) -> PxFilterData
Read the collision filter data of this shape
sourcefn set_query_filter_data(&mut self, this_layers: CollisionLayers)
fn set_query_filter_data(&mut self, this_layers: CollisionLayers)
Set the query filter of this shape
sourcefn get_query_filter_data(&self) -> PxFilterData
fn get_query_filter_data(&self) -> PxFilterData
Read the query filter data of this shape
sourcefn get_nb_materials(&self) -> u16
fn get_nb_materials(&self) -> u16
Get the number of materials associated with this shape
sourcefn get_materials(&self) -> Vec<&Self::Material>
fn get_materials(&self) -> Vec<&Self::Material>
Get a vector of all materials associated with this shape
sourcefn get_materials_mut(&mut self) -> Vec<&mut Self::Material>
fn get_materials_mut(&mut self) -> Vec<&mut Self::Material>
Get a mut vector of all materials associated with this shape
sourcefn set_flags(&mut self, flags: ShapeFlags)
fn set_flags(&mut self, flags: ShapeFlags)
Sets the flags on this shape to the specified bitset