pub struct Collider {
pub offset: Affine2,
pub absolute_transform: Affine2,
pub user_data: u128,
pub parent: Option<RigidBodyHandle>,
pub radius: f32,
pub mass_override: Option<f32>,
pub flags: ColliderFlags,
pub collision_groups: InteractionGroups,
pub shape: Box<dyn Shape>,
}Fields§
§offset: Affine2§absolute_transform: Affine2§user_data: u128§parent: Option<RigidBodyHandle>§radius: f32§mass_override: Option<f32>§flags: ColliderFlags§collision_groups: InteractionGroups§shape: Box<dyn Shape>Implementations§
Source§impl Collider
impl Collider
pub fn relative_translation(&self) -> Vec2
pub fn relative_rotation(&self) -> f32
pub fn absolute_rotation(&self) -> f32
pub fn mass(&self) -> f32
pub fn inertia(&self) -> f32
pub fn is_sensor(&self) -> bool
pub fn absolute_translation(&self) -> Vec2
pub fn shape(&self) -> &dyn Shape
pub fn calculate_aabb(&self) -> AABB
pub fn calculate_relative_aabb(&self) -> AABB
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Collider
impl !RefUnwindSafe for Collider
impl !Send for Collider
impl !Sync for Collider
impl Unpin for Collider
impl !UnwindSafe for Collider
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more