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 com_acc() | get the current com acceleration [m/s^2] |
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 ang_acc() | get the angular acceleration [rad/s^2] 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 |
void set_com_pos(const LuaVec3 &p) | set the com position [m] of the body |
void set_ori(const LuaQuat &q) | set the orientation of the body |
void set_lin_vel(const LuaVec3 &v) | set the com velocity [m/s] of the body |
void set_ang_vel(const LuaVec3 &v) | set the angular velocity [rad/s] of the body |
Converted from doxygen using dokugen