pub struct Body<const D: usize> { /* private fields */ }Implementations§
Source§impl<const D: usize> Body<D>
impl<const D: usize> Body<D>
pub fn position(&self) -> [f32; D]
pub fn velocity(&self) -> [f32; D]
pub fn shape(&self) -> Shape<D>
pub fn kind(&self) -> BodyKind
pub fn is_sensor(&self) -> bool
pub fn user_data(&self) -> u64
pub fn layers(&self) -> CollisionLayers
pub fn description(&self) -> BodyDesc<D>
pub fn set_position(&mut self, position: [f32; D]) -> Result<(), PhysicsError>
pub fn set_velocity(&mut self, velocity: [f32; D]) -> Result<(), PhysicsError>
pub fn set_layers(&mut self, layers: CollisionLayers)
pub fn set_user_data(&mut self, data: u64)
pub fn clear_forces(&mut self)
pub fn apply_force(&mut self, force: [f32; D]) -> Result<(), PhysicsError>
pub fn apply_impulse(&mut self, impulse: [f32; D]) -> Result<(), PhysicsError>
Trait Implementations§
Auto Trait Implementations§
impl<const D: usize> Freeze for Body<D>
impl<const D: usize> RefUnwindSafe for Body<D>
impl<const D: usize> Send for Body<D>
impl<const D: usize> Sync for Body<D>
impl<const D: usize> Unpin for Body<D>
impl<const D: usize> UnwindSafe for Body<D>
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