Struct heron::rapier_plugin::rapier2d::dynamics::MultibodyJoint
pub struct MultibodyJoint {
pub data: GenericJoint,
/* private fields */
}
Expand description
An joint attached to two bodies based on the reduced coordinates formalism.
Fields
data: GenericJoint
The joint’s description.
Implementations
impl MultibodyJoint
impl MultibodyJoint
pub fn new(data: GenericJoint) -> MultibodyJoint
pub fn new(data: GenericJoint) -> MultibodyJoint
Creates a new multibody joint from its description.
pub fn body_to_parent(&self) -> Isometry<f32, Unit<Complex<f32>>, 2>
pub fn body_to_parent(&self) -> Isometry<f32, Unit<Complex<f32>>, 2>
The position of the multibody link containing this multibody_joint relative to its parent.
pub fn apply_displacement(&mut self, disp: &[f32])
pub fn apply_displacement(&mut self, disp: &[f32])
Apply a displacement to the multibody_joint.
pub fn jacobian(
&self,
transform: &Unit<Complex<f32>>,
out: &mut Matrix<f32, Const<3>, Dynamic, SliceStorageMut<'_, f32, Const<3>, Dynamic, Const<1>, Const<3>>>
)
pub fn jacobian(
&self,
transform: &Unit<Complex<f32>>,
out: &mut Matrix<f32, Const<3>, Dynamic, SliceStorageMut<'_, f32, Const<3>, Dynamic, Const<1>, Const<3>>>
)
Sets in out
the non-zero entries of the multibody_joint jacobian transformed by transform
.
pub fn jacobian_mul_coordinates(&self, acc: &[f32]) -> RigidBodyVelocity
pub fn jacobian_mul_coordinates(&self, acc: &[f32]) -> RigidBodyVelocity
Multiply the multibody_joint jacobian by generalized velocities to obtain the relative velocity of the multibody link containing this multibody_joint.
pub fn default_damping(
&self,
out: &mut Matrix<f32, Dynamic, Const<1>, SliceStorageMut<'_, f32, Dynamic, Const<1>, Const<1>, Dynamic>>
)
pub fn default_damping(
&self,
out: &mut Matrix<f32, Dynamic, Const<1>, SliceStorageMut<'_, f32, Dynamic, Const<1>, Const<1>, Dynamic>>
)
Fill out
with the non-zero entries of a damping that can be applied by default to ensure a good stability of the multibody_joint.
pub fn num_velocity_constraints(&self) -> usize
pub fn num_velocity_constraints(&self) -> usize
Maximum number of velocity constrains that can be generated by this multibody_joint.
pub fn velocity_constraints(
&self,
params: &IntegrationParameters,
multibody: &Multibody,
link: &MultibodyLink,
dof_id: usize,
j_id: &mut usize,
jacobians: &mut Matrix<f32, Dynamic, Const<1>, VecStorage<f32, Dynamic, Const<1>>>,
constraints: &mut Vec<AnyJointVelocityConstraint, Global>,
insert_at: &mut Option<usize>
)
pub fn velocity_constraints(
&self,
params: &IntegrationParameters,
multibody: &Multibody,
link: &MultibodyLink,
dof_id: usize,
j_id: &mut usize,
jacobians: &mut Matrix<f32, Dynamic, Const<1>, VecStorage<f32, Dynamic, Const<1>>>,
constraints: &mut Vec<AnyJointVelocityConstraint, Global>,
insert_at: &mut Option<usize>
)
Initialize and generate velocity constraints to enforce, e.g., multibody_joint limits and motors.
Trait Implementations
impl Clone for MultibodyJoint
impl Clone for MultibodyJoint
fn clone(&self) -> MultibodyJoint
fn clone(&self) -> MultibodyJoint
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreimpl Debug for MultibodyJoint
impl Debug for MultibodyJoint
impl Copy for MultibodyJoint
Auto Trait Implementations
impl RefUnwindSafe for MultibodyJoint
impl Send for MultibodyJoint
impl Sync for MultibodyJoint
impl Unpin for MultibodyJoint
impl UnwindSafe for MultibodyJoint
Blanket Implementations
impl<T, U> AsBindGroupShaderType<U> for Twhere
U: ShaderType,
&'a T: for<'a> Into<U>,
impl<T, U> AsBindGroupShaderType<U> for Twhere
U: ShaderType,
&'a T: for<'a> Into<U>,
fn as_bind_group_shader_type(
&self,
_images: &HashMap<Handle<Image>, <Image as RenderAsset>::PreparedAsset, RandomState, Global>
) -> U
fn as_bind_group_shader_type(
&self,
_images: &HashMap<Handle<Image>, <Image as RenderAsset>::PreparedAsset, RandomState, Global>
) -> U
T
[ShaderType
] for self
. When used in [AsBindGroup
]
derives, it is safe to assume that all images in self
exist. Read moresourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
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
. Read morefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read morefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read morefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read moresourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read morefn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.