[ 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_Curve Library
Curve library
Number of functions: 10
HYP_Curve.Create
Creates a new curve object.
: Lua - Python
numPoints [INTEGER]: number of points
curveId [INTEGER]: curve identifier
:
curveId = HYP_Curve.Create(1000)
HYP_Curve.Destroy
Destroys an existing curve object.
: Lua - Python
curveId [INTEGER]: curve identifier
:
HYP_Curve.Destroy(curveId)
HYP_Curve.GetNumPoints
Returns the curve's number of points.
: Lua - Python
curveId [INTEGER]: curve identifier
numPoints [INTEGER]: number of points
:
curveId = HYP_Object.GetId("myCurve")
num_points = HYP_Curve.GetNumPoints(curveId);
HYP_Curve.GetVertexPosition
Gets the position of a point on the curve.
: Lua - Python
curveId [INTEGER]: curve identifier
index [INTEGER]: index of the point. Range: [0 ; HYP_Curve.GetNumPoints()-1]
x, y, z [REAL]: position
:
numPoints = HYP_Curve.GetNumPoints(curveId);
x, y, z = HYP_Curve.GGetVertexPosition(curveId, numPoints/2);
HYP_Curve.SetVertexPosition
Sets the position of a point on the curve.
: Lua - Python
curveId [INTEGER]: curve identifier
index [INTEGER]: index of the point. Range: [0 ; HYP_Curve.GetNumPoints()-1]
x, y, z [REAL]: position
:
numPoints = HYP_Curve.GetNumPoints(curveId);
HYP_Curve.SetVertexPosition(curveId, numPoints/2, x, y, z);
HYP_Curve.SetVertexColor
Sets the color of a point on the curve.
: Lua - Python
curveId [INTEGER]: curve identifier
index [INTEGER]: index of the point. Range: [0 ; HYP_Curve.GetNumPoints()-1]
r, g, b, a [REAL]: color in RGBA form.
:
numPoints = HYP_Curve.GetNumPoints(curveId);
HYP_Curve.SetVertexColor(curveId, numPoints/2, 0.2, 0.5, 0.5, 1.0);
HYP_Curve.GetVertexColor
Gets the color of a point on the curve.
: Lua - Python
curveId [INTEGER]: curve identifier
index [INTEGER]: index of the point. Range: [0 ; HYP_Curve.GetNumPoints()-1]
r, g, b, a [REAL]: color in RGBA form
:
numPoints = HYP_Curve.GetNumPoints(curveId);
r, g, b, a = HYP_Curve.GetVertexColor(curveId, numPoints/2);
HYP_Curve.SetVerticesColor
Sets the color of all curve's vertices.
: Lua - Python
curveId [INTEGER]: curve identifier
r, g, b, a [REAL]: color in RGBA form.
:
HYP_Curve.SetVertexColor(curveId, 0.2, 0.5, 0.5, 1.0);
HYP_Curve.SetStartIndex
Sets the starting point of curve rendering.
: Lua - Python
curveId [INTEGER]: curve identifier
index [INTEGER]: index of the point. Range: [0 ; HYP_Curve.GetNumPoints()-1]
:
HYP_Curve.SetStartIndex(curveId, 0);
HYP_Curve.SetEndIndex
Sets the ending point of curve rendering.
: Lua - Python
curveId [INTEGER]: curve identifier
index [INTEGER]: index of the point. Range: [0 ; HYP_Curve.GetNumPoints()-1]
:
numPoints = HYP_Curve.GetNumPoints(curveId);
HYP_Curve.SetEndIndex(curveId, numPoints/2);
|