pub struct CharacterCapsule { /* private fields */ }Expand description
A character’s collision capsule: a cylinder of 2 * half_height capped by
hemispheres of radius, standing on the y axis.
Implementations§
Source§impl CharacterCapsule
impl CharacterCapsule
Sourcepub fn new(half_height: f32, radius: f32) -> Self
pub fn new(half_height: f32, radius: f32) -> Self
Build the capsule for a cylinder of 2 * half_height capped by
hemispheres of radius.
Sourcepub fn resize(&mut self, half_height: f32, radius: f32)
pub fn resize(&mut self, half_height: f32, radius: f32)
Adopt new dimensions, for a character whose capsule was re-authored.
Sourcepub fn half_height(&self) -> f32
pub fn half_height(&self) -> f32
Half the cylindrical section’s height, excluding the caps.
Trait Implementations§
Source§impl Clone for CharacterCapsule
impl Clone for CharacterCapsule
Source§fn clone(&self) -> CharacterCapsule
fn clone(&self) -> CharacterCapsule
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CharacterCapsule
Source§impl Debug for CharacterCapsule
impl Debug for CharacterCapsule
Source§impl PartialEq for CharacterCapsule
impl PartialEq for CharacterCapsule
impl StructuralPartialEq for CharacterCapsule
Auto Trait Implementations§
impl Freeze for CharacterCapsule
impl RefUnwindSafe for CharacterCapsule
impl Send for CharacterCapsule
impl Sync for CharacterCapsule
impl Unpin for CharacterCapsule
impl UnsafeUnpin for CharacterCapsule
impl UnwindSafe for CharacterCapsule
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