[ Back to Geeks3D.com ]
 GeeXLab
Laboratory for Real Time 3D Programming (prototyping and demos) OpenGL, Lua, Python, GLSL, PhysX and more...Reference Guide Host-API Lua / Python
» Back to Homepage
» Back to Developer's Guide Index
HYP_MotionPath Library
Motion Path library
Number of functions: 11
HYP_MotionPath.Create
Creates a motion path object.
: Lua - Python
numSegments [INTEGER]: Number of motion path segments (default = 1000).
mpId [INTEGER]: motion path id
:
mpId = HYP_MotionPath.Create(1000)
HYP_MotionPath.Destroy
Destroys a motion path object.
: Lua - Python
mpId [INTEGER]: motion path id
:
HYP_MotionPath.Destroy(mpId)
HYP_MotionPath.AddKeyframe
Adds a keyframe to a motion path object.
: Lua - Python
mpId [INTEGER]: motion path id
x, y, z [REAL]: 3D position of the key.
index [INTEGER]: keyframe index (zero-based)
:
index = HYP_MotionPath.AddKeyframe(mpId, x, y, z)
HYP_MotionPath.SetKeyframe
Sets the position of a keyframe.
: Lua - Python
mpId [INTEGER]: motion path id
index [INTEGER]: keyframe index (zero-based)
x, y, z [REAL]: 3D position of the keyframe.
:
HYP_MotionPath.SetKeyframe(mpId, index, x, y, z)
HYP_MotionPath.GetKeyframe
Gets the position of a keyframe.
: Lua - Python
mpId [INTEGER]: motion path id
index [INTEGER]: keyframe index (zero-based)
x, y, z [REAL]: 3D position of the keyframe.
:
x, y, z = HYP_MotionPath.GetKeyframe(mpId, index)
HYP_MotionPath.SetKeyframeTangent
Sets the tangent of a keyframe.
: Lua - Python
mpId [INTEGER]: motion path id
index [INTEGER]: keyframe index (zero-based)
x, y, z [REAL]: tangent vector.
:
HYP_MotionPath.SetKeyframeTangent(mpId, index, x, y, z)
HYP_MotionPath.GetKeyframeTangent
Gets the tangent of a keyframe.
: Lua - Python
mpId [INTEGER]: motion path id
index [INTEGER]: keyframe index (zero-based)
x, y, z [REAL]: tangent of the keyframe.
:
x, y, z = HYP_MotionPath.GetKeyframeTangent(mpId, index)
HYP_MotionPath.RemoveKeyframe
Removes a keyframe.
: Lua - Python
mpId [INTEGER]: motion path id
index [INTEGER]: keyframe index (zero-based)
:
HYP_MotionPath.RemoveKeyframe(mpId, index)
HYP_MotionPath.ComputeCurve
Computes (or evaluates) a motion path. Must be call after functions such as AddKeyframe(), SetKeyframeTangent() or RemoveKeyframe().
: Lua - Python
mpId [INTEGER]: motion path id
:
HYP_MotionPath.ComputeCurve(mpId)
HYP_MotionPath.Render
Render the motion path curve. Useful in post direct rendering scripts.
: Lua - Python
mpId [INTEGER]: motion path id
r, g, b [REAL]: motion path color
renderTangents [INTEGER]: enables (1) or disables (0) tangents rendering
tr, tg, tb [REAL]: tangents color
:
HYP_MotionPath.Render(mpId, r, g, b, renderTangents, tr, tg, tb)
HYP_MotionPath.GetValueByTime
Gets the 3D position of a point on the motion-path for a given normalized time (ranging between 0.0 and 1.0).
: Lua - Python
mpId [INTEGER]: Motion Path numeric identifier
time [REAL]: time value. 0.0 is the beginning of the motion-path and 1.0 is the end.
x, y, z [REAL]: 3D coordinates of the position
:
x, y, z = HYP_MotionPath.GetValueByTime(mpId, time)
|