Simbody
3.4 (development)
|
Three translational mobilities describing the Cartesian motion of a point. More...
#include <MobilizedBody_Translation.h>
Public Member Functions | |
Translation () | |
Default constructor provides an empty handle that can be assigned to reference any MobilizedBody::Translation. | |
Translation (MobilizedBody &parent, const Transform &X_PF, const Body &bodyInfo, const Transform &X_BM, Direction=Forward) | |
Create a Translation mobilizer between an existing parent (inboard) body P and a new child (outboard) body B created by copying the given bodyInfo into a privately-owned Body within the constructed MobilizedBody object. | |
Translation (MobilizedBody &parent, const Body &bodyInfo, Direction=Forward) | |
Abbreviated constructor you can use if the mobilizer frames are coincident with the parent and child body frames. | |
Translation & | addBodyDecoration (const Transform &X_BD, const DecorativeGeometry &g) |
Add decorative geometry specified relative to the new (outboard) body's reference frame B. | |
Translation & | addOutboardDecoration (const Transform &X_MD, const DecorativeGeometry &g) |
Add decorative geometry specified relative to the outboard mobilizer frame M attached to body B. | |
Translation & | addInboardDecoration (const Transform &X_FD, const DecorativeGeometry &g) |
Add decorative geometry specified relative to the inboard mobilizer frame F attached to the parent body P. | |
Translation & | setDefaultInboardFrame (const Transform &X_PF) |
Change this mobilizer's frame F on the parent body P. | |
Translation & | setDefaultOutboardFrame (const Transform &X_BM) |
Change this mobilizer's frame M fixed on this (the outboard) body B. | |
Translation & | setDefaultTranslation (const Vec3 &p_FM) |
const Vec3 & | getDefaultTranslation () const |
void | setMobilizerTranslation (State &s, const Vec3 &p_FM) const |
const Vec3 & | getMobilizerTranslation (const State &s) const |
void | setMobilizerVelocity (State &s, const Vec3 &v_FM) const |
const Vec3 & | getMobilizerVelocity (const State &s) const |
At stage Velocity or higher, return the cross-mobilizer velocity V_FM, the relative velocity of this body's "moving" mobilizer frame M in the parent body's corresponding "fixed" frame F, measured and expressed in F. | |
const Vec3 & | getMobilizerAcceleration (const State &s) const |
TODO: Not implemented yet -- any volunteers? At stage Acceleration, return the cross-mobilizer acceleration A_FM, the relative acceleration of body B's "moving" mobilizer frame M in the parent body's corresponding "fixed" frame F, measured and expressed in F. | |
const Vec3 & | getDefaultQ () const |
Translation & | setDefaultQ (const Vec3 &q) |
const Vec3 & | getQ (const State &) const |
const Vec3 & | getQDot (const State &) const |
const Vec3 & | getQDotDot (const State &) const |
const Vec3 & | getU (const State &) const |
const Vec3 & | getUDot (const State &) const |
void | setQ (State &, const Vec3 &) const |
void | setU (State &, const Vec3 &) const |
const Vec3 & | getMyPartQ (const State &, const Vector &qlike) const |
const Vec3 & | getMyPartU (const State &, const Vector &ulike) const |
Vec3 & | updMyPartQ (const State &, Vector &qlike) const |
Vec3 & | updMyPartU (const State &, Vector &ulike) const |
Three translational mobilities describing the Cartesian motion of a point.
The generalized coordinates q are x,y,z translations of the M (outboard) frame origin Mo along the parent (inboard) F frame axes. The generalized speeds u are the relative velocity v_FM of M's origin in F, so qdot=u for this mobilizer.
SimTK::MobilizedBody::Translation::Translation | ( | ) | [inline] |
Default constructor provides an empty handle that can be assigned to reference any MobilizedBody::Translation.
SimTK::MobilizedBody::Translation::Translation | ( | MobilizedBody & | parent, |
const Transform & | X_PF, | ||
const Body & | bodyInfo, | ||
const Transform & | X_BM, | ||
Direction | = Forward |
||
) |
Create a Translation mobilizer between an existing parent (inboard) body P and a new child (outboard) body B created by copying the given bodyInfo into a privately-owned Body within the constructed MobilizedBody object.
Specify the mobilizer frames F fixed to parent P and M fixed to child B.
SimTK::MobilizedBody::Translation::Translation | ( | MobilizedBody & | parent, |
const Body & | bodyInfo, | ||
Direction | = Forward |
||
) |
Abbreviated constructor you can use if the mobilizer frames are coincident with the parent and child body frames.
Translation& SimTK::MobilizedBody::Translation::addBodyDecoration | ( | const Transform & | X_BD, |
const DecorativeGeometry & | geometry | ||
) | [inline] |
Add decorative geometry specified relative to the new (outboard) body's reference frame B.
Note that the body itself may already have had some decorative geometry on it when it was first put into this MobilizedBody; this just adds more and the returned index is larger. Use the underlying Body object's accessors to find this decorative geometry again. The given geometry
object is copied here; we do not keep a reference to the supplied object.
Reimplemented from SimTK::MobilizedBody.
Translation& SimTK::MobilizedBody::Translation::addOutboardDecoration | ( | const Transform & | X_MD, |
const DecorativeGeometry & | geometry | ||
) | [inline] |
Add decorative geometry specified relative to the outboard mobilizer frame M attached to body B.
If body B already has decorative geometry on it, this just adds some more, but kept in a separate list from the body decorations and inboard decorations. Returns a unique index that can be used to identify this outboard decoration later (numbered starting from zero for outboard decorations only).
Reimplemented from SimTK::MobilizedBody.
Translation& SimTK::MobilizedBody::Translation::addInboardDecoration | ( | const Transform & | X_FD, |
const DecorativeGeometry & | geometry | ||
) | [inline] |
Add decorative geometry specified relative to the inboard mobilizer frame F attached to the parent body P.
If body P already has decorative geometry on it, this just adds some more, but kept in a separate list from the body decorations and outboard decorations. Returns a unique index that can be used to identify this inboard decoration later (numbered starting from zero for inboard decorations only).
Reimplemented from SimTK::MobilizedBody.
Translation& SimTK::MobilizedBody::Translation::setDefaultInboardFrame | ( | const Transform & | X_PF | ) | [inline] |
Change this mobilizer's frame F on the parent body P.
Calling this method invalidates the MobilizedBody's topology, so the containing matter subsystem's realizeTopology() method must be called again. A reference to this MobilizedBody is returned so that this can be chained like an assignment operator.
Reimplemented from SimTK::MobilizedBody.
Translation& SimTK::MobilizedBody::Translation::setDefaultOutboardFrame | ( | const Transform & | X_BM | ) | [inline] |
Change this mobilizer's frame M fixed on this (the outboard) body B.
Calling this method invalidates the MobilizedBody's topology, so the containing matter subsystem's realizeTopology() method must be called again. A reference to this MobilizedBody is returned so that this can be chained like an assignment operator.
Reimplemented from SimTK::MobilizedBody.
Translation& SimTK::MobilizedBody::Translation::setDefaultTranslation | ( | const Vec3 & | p_FM | ) | [inline] |
const Vec3& SimTK::MobilizedBody::Translation::getDefaultTranslation | ( | ) | const [inline] |
void SimTK::MobilizedBody::Translation::setMobilizerTranslation | ( | State & | s, |
const Vec3 & | p_FM | ||
) | const [inline] |
const Vec3& SimTK::MobilizedBody::Translation::getMobilizerTranslation | ( | const State & | s | ) | const [inline] |
void SimTK::MobilizedBody::Translation::setMobilizerVelocity | ( | State & | s, |
const Vec3 & | v_FM | ||
) | const [inline] |
const Vec3& SimTK::MobilizedBody::Translation::getMobilizerVelocity | ( | const State & | state | ) | const [inline] |
At stage Velocity or higher, return the cross-mobilizer velocity V_FM, the relative velocity of this body's "moving" mobilizer frame M in the parent body's corresponding "fixed" frame F, measured and expressed in F.
Note that this isn't the usual spatial velocity since it isn't expressed in G.
Reimplemented from SimTK::MobilizedBody.
const Vec3& SimTK::MobilizedBody::Translation::getMobilizerAcceleration | ( | const State & | state | ) | const [inline] |
TODO: Not implemented yet -- any volunteers? At stage Acceleration, return the cross-mobilizer acceleration A_FM, the relative acceleration of body B's "moving" mobilizer frame M in the parent body's corresponding "fixed" frame F, measured and expressed in F.
Note that this isn't the usual spatial acceleration since it isn't expressed in G.
Reimplemented from SimTK::MobilizedBody.
const Vec3& SimTK::MobilizedBody::Translation::getDefaultQ | ( | ) | const |
Translation& SimTK::MobilizedBody::Translation::setDefaultQ | ( | const Vec3 & | q | ) |
const Vec3& SimTK::MobilizedBody::Translation::getQ | ( | const State & | ) | const |
const Vec3& SimTK::MobilizedBody::Translation::getQDot | ( | const State & | ) | const |
const Vec3& SimTK::MobilizedBody::Translation::getQDotDot | ( | const State & | ) | const |
const Vec3& SimTK::MobilizedBody::Translation::getU | ( | const State & | ) | const |
const Vec3& SimTK::MobilizedBody::Translation::getUDot | ( | const State & | ) | const |
void SimTK::MobilizedBody::Translation::setQ | ( | State & | , |
const Vec3 & | |||
) | const |
void SimTK::MobilizedBody::Translation::setU | ( | State & | , |
const Vec3 & | |||
) | const |
const Vec3& SimTK::MobilizedBody::Translation::getMyPartQ | ( | const State & | , |
const Vector & | qlike | ||
) | const |
const Vec3& SimTK::MobilizedBody::Translation::getMyPartU | ( | const State & | , |
const Vector & | ulike | ||
) | const |
Vec3& SimTK::MobilizedBody::Translation::updMyPartQ | ( | const State & | , |
Vector & | qlike | ||
) | const |
Vec3& SimTK::MobilizedBody::Translation::updMyPartU | ( | const State & | , |
Vector & | ulike | ||
) | const |