LuaBody

Body type for use in lua scripting.

See ScriptController and ScriptMeasure for details on scripting.

Public Functions

Function Description
LuaString name() get the name of the body
LuaNumber mass() get the mass of the body [kg]
LuaVec3 inertia_diagonal() get the diagonal of the inertia tensor of the body
LuaVec3 com_pos() get the current com position [m]
LuaVec3 com_vel() get the current com velocity [m/s]
LuaVec3 point_pos(const LuaVec3 &p) get the global position [m] of a local point p on the body
LuaVec3 point_vel(const LuaVec3 &p) get the global linear velocity [m/s] of a local point p on the body
LuaQuat ori() get the body orientation as a quaternion
LuaVec3 ang_pos() get the body orientation as a 3d rotation vector [rad]
LuaVec3 ang_vel() get the angular velocity [rad/s] of the body
LuaVec3 contact_force() get the contact force vector [N] applied to this body via contact geometry
LuaVec3 contact_moment() get the contact moment vector [Nm] applied to this body via contact geometry
LuaVec3 contact_point() get contact point vector [m] of a contact force applied to this body (zero if no contact)
void add_external_force(LuaNumber x, LuaNumber y, LuaNumber z) add external force [N] to body com
void add_external_moment(LuaNumber x, LuaNumber y, LuaNumber z) add external moment [Nm] to body

Converted from doxygen using dokugen

  • (external edit)