pub struct IkGoal {
pub body: usize,
pub kind: IkGoalKind,
pub weight: f64,
}Expand description
A single kinematic goal.
Build with IkGoal::position or IkGoal::orientation and adjust
weight to trade goals off against each other — weights scale the
residual rows, so a goal at weight 10.0 is worth a hundred times one at
weight 1.0 in the least-squares sense.
Fields§
§body: usizeBody the goal applies to.
kind: IkGoalKindWhat is being asked of it.
weight: f64Relative importance. Defaults to 1.0.
Implementations§
Source§impl IkGoal
impl IkGoal
Sourcepub fn position(
body: usize,
local_point: Vec3<f64>,
target: Vec3<f64>,
) -> IkGoal
pub fn position( body: usize, local_point: Vec3<f64>, target: Vec3<f64>, ) -> IkGoal
A position goal at unit weight: put local_point (body frame) on
target (world frame).
Sourcepub fn orientation(body: usize, target: Mat3<f64>) -> IkGoal
pub fn orientation(body: usize, target: Mat3<f64>) -> IkGoal
An orientation goal at unit weight. target is the desired
world→body rotation; see IkGoalKind::Orientation.
Sourcepub fn with_weight(self, weight: f64) -> IkGoal
pub fn with_weight(self, weight: f64) -> IkGoal
Set the goal’s weight, builder-style.
Trait Implementations§
impl StructuralPartialEq for IkGoal
Auto Trait Implementations§
impl Freeze for IkGoal
impl RefUnwindSafe for IkGoal
impl Send for IkGoal
impl Sync for IkGoal
impl Unpin for IkGoal
impl UnsafeUnpin for IkGoal
impl UnwindSafe for IkGoal
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