Trait physx::controller::Controller
source · [−]pub trait Controller: Class<PxController> + Sized {
type UserData;
type Descriptor: Class<PxControllerDesc>;
fn get_user_data(&self) -> &Self::UserData { ... }
fn set_user_data(&mut self, user_data: Self::UserData) -> &mut Self { ... }
fn set_position(&mut self, position: impl Into<PxExtendedVec3>) { ... }
fn get_position(&self) -> PxVec3 { ... }
}
Required Associated Types
type UserData
type Descriptor: Class<PxControllerDesc>
Provided Methods
sourcefn get_user_data(&self) -> &Self::UserData
fn get_user_data(&self) -> &Self::UserData
Retrieve the user data from the controller.
sourcefn set_user_data(&mut self, user_data: Self::UserData) -> &mut Self
fn set_user_data(&mut self, user_data: Self::UserData) -> &mut Self
Sets the controllers user data. If U is larger than a *mut _, it is heap allocated in a box. Otherwise, it is packed directly into the *mut c_void userData field.
sourcefn set_position(&mut self, position: impl Into<PxExtendedVec3>)
fn set_position(&mut self, position: impl Into<PxExtendedVec3>)
Set the position of teh controller
sourcefn get_position(&self) -> PxVec3
fn get_position(&self) -> PxVec3
Get the position of the controller.