Differences
This shows you the differences between two versions of the page.
ref:lua_body [2020/01/07 16:26] |
ref:lua_body [2020/06/19 15:47] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== LuaBody ====== | ||
+ | Body type for use in lua scripting. | ||
+ | |||
+ | See [[script_controller|ScriptController]] and [[script_measure|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 | | ||
+ | |||
+ | <sub>Converted from doxygen using [[https://github.com/tgeijten/dokugen|dokugen]]</sub> | ||