Trait physx::rigid_static::RigidStatic
source · pub trait RigidStatic: Class<PxRigidStatic> + RigidActor + UserData {
// Provided methods
fn new(
physics: &mut impl Physics,
transform: PxTransform,
geometry: &impl Class<PxGeometry>,
material: &mut <Self::Shape as Shape>::Material,
shape_transform: PxTransform,
user_data: Self::UserData
) -> Option<Owner<Self>> { ... }
unsafe fn from_raw(
ptr: *mut PxRigidStatic,
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 get_concrete_type_name(&self) -> Option<&str> { ... }
}
Provided Methods§
sourcefn new(
physics: &mut impl Physics,
transform: PxTransform,
geometry: &impl Class<PxGeometry>,
material: &mut <Self::Shape as Shape>::Material,
shape_transform: PxTransform,
user_data: Self::UserData
) -> Option<Owner<Self>>
fn new( physics: &mut impl Physics, transform: PxTransform, geometry: &impl Class<PxGeometry>, material: &mut <Self::Shape as Shape>::Material, shape_transform: PxTransform, user_data: Self::UserData ) -> Option<Owner<Self>>
Create a new RigidStatic.
sourceunsafe fn from_raw(
ptr: *mut PxRigidStatic,
user_data: Self::UserData
) -> Option<Owner<Self>>
unsafe fn from_raw( ptr: *mut PxRigidStatic, 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.
Initializes user data.
sourcefn get_user_data(&self) -> &Self::UserData
fn get_user_data(&self) -> &Self::UserData
Get the user data.
sourcefn get_user_data_mut(&mut self) -> &mut Self::UserData
fn get_user_data_mut(&mut self) -> &mut Self::UserData
Get the user data.
sourcefn get_concrete_type_name(&self) -> Option<&str>
fn get_concrete_type_name(&self) -> Option<&str>
Get the name of the real type referenced by this pointer, or None if the returned string is not valid