[ 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_VertexPool Library
Vertex pool object
Number of functions: 11
HYP_VertexPool.Create
Creates a vertex pool.
: Lua
num_vertices [INTEGER]: Number of vertices in the vertex pool.
name [STRING]: Name of vertex pool, optional .
vp_id [INTEGER]: Vertex pool identifier
: vp_id = HYP_VertexPool.Create( num_vertices, [name] );
HYP_VertexPool.Destroy
Destroys a vertex pool
: Lua
vp_id [INTEGER]: identifier of vertex pool.
:
HYP_VertexPool.Destroy( id_vp )
HYP_VertexPool.SetVertexPosition
SetVertexPosition allows to change the position of one particular vertex in the pool.
The fast version of the function does no validity checking on parameters
: Lua
vp_id [INTEGER]: identifier of vertex pool.
vertex_index [INTEGER]: Index of vertex in the vertex pool.
x [REAL]: Coordinate in X of vertex
y [REAL]: Coordinate in Y of vertex
z [REAL]: Coordinate in Z of vertex
:
HYP_VertexPool.SetVertexPosition( id_vp, vertex_index, x, y, z )
HYP_VertexPool.GetVertexPosition
GetVertexPosition allows to get the position of one particular vertex in the pool.
The fast version of the function does no validity checking on parameters
: Lua
vp_id [INTEGER]: identifier of vertex pool.
vertex_index [INTEGER]: Index of Vertex in the vertex pool.
x [REAL]: Coordinate in X of vertex
y [REAL]: Coordinate in Y of vertex
z [REAL]: Coordinate in Z of vertex
:
x, y, z = HYP_VertexPool.GetVertexPosition( vp_id, vertex_index )
HYP_VertexPool.SetVertexColor
SetVertexColor allows to change the color of one particular vertex in a vertex pool.
The fast version of the function does no validity checking on parameters.
: Lua
vp_id [INTEGER]: identifier of vertex pool.
vertex_index [INTEGER]: Index of Vertex in the vertex pool.
r [REAL]: red component of vertex color.
g [REAL]: green component of vertex color.
b [REAL]: blue component of vertex color.
a [REAL]: alpha component of vertex color.
:
HYP_VertexPool.SetVertexColor( vp_id, vertex_index, r, g, b, a )
HYP_VertexPool.GetVertexColor
GetVertexColor allows to get the color of one particular vertex in a vertex pool.
The fast version of the function does no validity checking on parameters.
: Lua
vp_id [INTEGER]: identifier of vertex pool.
vertex_index [INTEGER]: Index of Vertex in the vertex pool.
r [REAL]: red component of vertex color.
g [REAL]: green component of vertex color.
b [REAL]: blue component of vertex color.
a [REAL]: alpha component of vertex color.
:
r, g, b, a = HYP_VertexPool.GetVertexColor( vp_id, vertex_index );
HYP_VertexPool.SetVerticesColor
SetVerticesColor allows to set the color of all the vertex pool vertices.
: Lua
vp_id [INTEGER]: identifier of vertex pool.
r [REAL]: red component of vertices color.
g [REAL]: green component of vertices color.
b [REAL]: blue component of vertices color.
a [REAL]: alpha component of vertices color.
id [INTEGER]: Playlist identifier
:
HYP_VertexPool.SetVerticesColor( vp_id, r, g, b, a )
HYP_VertexPool.SetVerticesSize
SetVerticesSize allows to change the size of all the vertex pool vertices.
: Lua
vp_id [INTEGER]: identifier of vertex pool.
size [REAL]:
:
HYP_VertexPool.SetVerticesSize( vp_id, size )
HYP_VertexPool.Create
: Lua
vp_id [INTEGER]: identifier of vertex pool.
a [REAL]: A constant component of the distance attenuation factor.
b [REAL]: B linear component of the distance attenuation factor.
c [REAL]: C quaratic component of the distance attenuation factor.
:
HYP_VertexPool.SetPointSpriteDistAtt( vp_id, a, b, c )
HYP_VertexPool.SetVertexRenderingState
SetVertexRenderingState activates or desactivates the rendering
of one particular vertex in a vertex pool.
: Lua
vp_id [INTEGER]: identifier of vertex pool.
vertex_index [INTEGER]: Index of Vertex in the vertex pool.
state [INTEGER]: Activate the rendering of the vertex =1 , desactivate = 0.
:
HYP_VertexPool.SetVertexRenderingState( vp_id, vertex_index, state );
HYP_VertexPool.GetVertexRenderingState
GetVertexRenderingState returns the rendering state of one particular vertex.
: Lua
vp_id [INTEGER]: identifier of vertex pool.
vertex_index [INTEGER]: Index of Vertex in the vertex pool.
state [INTEGER]: 1 = rendering of the vertex activated =1 , 0 = desactivated.
:
state = HYP_VertexPool.GetVertexRenderingState( vp_id, vertex_index )
|