Differences

This shows you the differences between two versions of the page.

Link to this comparison view

ref:lua_body [2019/10/23 15:06]
ref:lua_body [2019/11/12 15:29] (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 |
 +| 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**() | add contact force [N] vector to body com |
 +| LuaVec3 **contact_moment**() | get contact moment [Nm] vector to body |
 +| LuaVec3 **contact_point**() | get contact point [m] vector to 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>​