pub struct MultibodyLink<N>{ /* private fields */ }Expand description
One link of a multibody.
Implementations§
Source§impl<N> MultibodyLink<N>
impl<N> MultibodyLink<N>
Sourcepub fn new(
internal_id: usize,
assembly_id: usize,
impulse_id: usize,
parent_internal_id: usize,
dof: Box<dyn Joint<N>>,
parent_shift: Matrix<N, Const<nalgebra::::base::dimension::U2::{constant#0}>, Const<1>, ArrayStorage<N, 2, 1>>,
body_shift: Matrix<N, Const<nalgebra::::base::dimension::U2::{constant#0}>, Const<1>, ArrayStorage<N, 2, 1>>,
parent_to_world: Isometry<N, Unit<Complex<N>>, 2>,
local_to_world: Isometry<N, Unit<Complex<N>>, 2>,
local_to_parent: Isometry<N, Unit<Complex<N>>, 2>,
local_inertia: Inertia2<N>,
local_com: OPoint<N, Const<2>>,
) -> MultibodyLink<N>
pub fn new( internal_id: usize, assembly_id: usize, impulse_id: usize, parent_internal_id: usize, dof: Box<dyn Joint<N>>, parent_shift: Matrix<N, Const<nalgebra::::base::dimension::U2::{constant#0}>, Const<1>, ArrayStorage<N, 2, 1>>, body_shift: Matrix<N, Const<nalgebra::::base::dimension::U2::{constant#0}>, Const<1>, ArrayStorage<N, 2, 1>>, parent_to_world: Isometry<N, Unit<Complex<N>>, 2>, local_to_world: Isometry<N, Unit<Complex<N>>, 2>, local_to_parent: Isometry<N, Unit<Complex<N>>, 2>, local_inertia: Inertia2<N>, local_com: OPoint<N, Const<2>>, ) -> MultibodyLink<N>
Creates a new multibody link.
Sourcepub fn joint(&self) -> &(dyn Joint<N> + 'static)
pub fn joint(&self) -> &(dyn Joint<N> + 'static)
Reference to the joint attaching this link to its parent.
Sourcepub fn joint_mut(&mut self) -> &mut (dyn Joint<N> + 'static)
pub fn joint_mut(&mut self) -> &mut (dyn Joint<N> + 'static)
Mutable reference to the joint attaching this link to its parent.
Sourcepub fn parent_shift(
&self,
) -> &Matrix<N, Const<nalgebra::::base::dimension::U2::{constant#0}>, Const<1>, ArrayStorage<N, 2, 1>>
pub fn parent_shift( &self, ) -> &Matrix<N, Const<nalgebra::::base::dimension::U2::{constant#0}>, Const<1>, ArrayStorage<N, 2, 1>>
The shift between this link’s parent and this link joint origin.
Sourcepub fn body_shift(
&self,
) -> &Matrix<N, Const<nalgebra::::base::dimension::U2::{constant#0}>, Const<1>, ArrayStorage<N, 2, 1>>
pub fn body_shift( &self, ) -> &Matrix<N, Const<nalgebra::::base::dimension::U2::{constant#0}>, Const<1>, ArrayStorage<N, 2, 1>>
The shift between this link’s joint origin and this link origin.
Trait Implementations§
Source§impl<N> BodyPart<N> for MultibodyLink<N>
impl<N> BodyPart<N> for MultibodyLink<N>
Source§fn center_of_mass(&self) -> OPoint<N, Const<2>>
fn center_of_mass(&self) -> OPoint<N, Const<2>>
The center of mass of this body part.
Source§fn local_center_of_mass(&self) -> OPoint<N, Const<2>>
fn local_center_of_mass(&self) -> OPoint<N, Const<2>>
The local center of mass of this body part.
Source§fn position(&self) -> Isometry<N, Unit<Complex<N>>, 2>
fn position(&self) -> Isometry<N, Unit<Complex<N>>, 2>
The position of this body part wrt. the ground.
Source§fn local_inertia(&self) -> Inertia2<N>
fn local_inertia(&self) -> Inertia2<N>
The local-space inertia of this body part.
Auto Trait Implementations§
impl<N> Freeze for MultibodyLink<N>where
N: Freeze,
impl<N> !RefUnwindSafe for MultibodyLink<N>
impl<N> Send for MultibodyLink<N>
impl<N> Sync for MultibodyLink<N>
impl<N> Unpin for MultibodyLink<N>where
N: Unpin,
impl<N> UnsafeUnpin for MultibodyLink<N>where
N: UnsafeUnpin,
impl<N> !UnwindSafe for MultibodyLink<N>
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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 moreSource§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.