Struct wrapped2d::dynamics::body::Body

source ·
pub struct Body { /* private fields */ }

Implementations§

source§

impl Body

source

pub fn handle(&self) -> BodyHandle

source

pub fn transform<'a>(&'a self) -> &'a Transform

source

pub fn position<'a>(&'a self) -> &'a Vec2

source

pub fn angle(&self) -> f32

source

pub fn world_center<'a>(&'a self) -> &'a Vec2

source

pub fn local_center<'a>(&'a self) -> &'a Vec2

source

pub fn linear_velocity<'a>(&'a self) -> &'a Vec2

source

pub fn angular_velocity(&self) -> f32

source

pub fn mass(&self) -> f32

source

pub fn inertia(&self) -> f32

source

pub fn mass_data(&self) -> MassData

source

pub fn world_point(&self, local: &Vec2) -> Vec2

source

pub fn world_vector(&self, local: &Vec2) -> Vec2

source

pub fn local_point(&self, world: &Vec2) -> Vec2

source

pub fn local_vector(&self, world: &Vec2) -> Vec2

source

pub fn linear_velocity_from_world_point(&self, world: &Vec2) -> Vec2

source

pub fn linear_velocity_from_local_point(&self, local: &Vec2) -> Vec2

source

pub fn linear_damping(&self) -> f32

source

pub fn angular_damping(&self) -> f32

source

pub fn gravity_scale(&self) -> f32

source

pub fn body_type(&self) -> BodyType

source

pub fn is_bullet(&self) -> bool

source

pub fn is_sleeping_allowed(&self) -> bool

source

pub fn is_awake(&self) -> bool

source

pub fn is_active(&self) -> bool

source

pub fn is_rotation_fixed(&self) -> bool

source

pub fn joints(&self) -> JointIter<'_>

source

pub fn set_transform(&mut self, pos: &Vec2, angle: f32)

source

pub fn set_linear_velocity(&mut self, v: &Vec2)

source

pub fn set_angular_velocity(&mut self, v: f32)

source

pub fn apply_force(&mut self, force: &Vec2, point: &Vec2, wake: bool)

source

pub fn apply_force_to_center(&mut self, force: &Vec2, wake: bool)

source

pub fn apply_torque(&mut self, torque: f32, wake: bool)

source

pub fn apply_linear_impulse(&mut self, impulse: &Vec2, point: &Vec2, wake: bool)

source

pub fn apply_angular_impulse(&mut self, impulse: f32, wake: bool)

source

pub fn set_mass_data(&mut self, data: &MassData)

source

pub fn reset_mass_data(&mut self)

source

pub fn set_linear_damping(&mut self, damping: f32)

source

pub fn set_angular_damping(&mut self, damping: f32)

source

pub fn set_gravity_scale(&mut self, scale: f32)

source

pub fn set_body_type(&mut self, typ: BodyType)

source

pub fn set_bullet(&mut self, flag: bool)

source

pub fn set_sleeping_allowed(&mut self, flag: bool)

source

pub fn set_awake(&mut self, flag: bool)

source

pub fn set_active(&mut self, flag: bool)

source

pub fn set_rotation_fixed(&mut self, flag: bool)

source

pub fn dump(&mut self)

Auto Trait Implementations§

§

impl RefUnwindSafe for Body

§

impl !Send for Body

§

impl !Sync for Body

§

impl Unpin for Body

§

impl UnwindSafe for Body

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.