[ 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_Scene Library
Scene library
Number of functions: 10
HYP_Scene.GetWindowSize
Returns the window size.
: Lua - Python
w [INTEGER]: width
h [INTEGER]: height
:
w, h = HYP_Scene.GetWindowSize()
HYP_Scene.SetBackgroundColor
Sets the background color.
: Lua - Python
r, g, b [REAL]: RGB color of the background.
:
HYP_Scene.SetBackgroundColor(r, g, b)
HYP_Scene.SetBackgroundImageVertexColor
Sets the vertex color of background image.
: Lua - Python
vertexIndex [INTEGER]: index of the vertex. - Values = 0|1|2|3
r, g, b, a [REAL]: RGBA color of the vertex.
:
HYP_Scene.SetBackgroundImageVertexColor(0, 0.1, 0.2, 0.2, 1.0)
HYP_Scene.SetBackgroundImageVertexColor(1, 0.1, 0.2, 0.2, 1.0)
HYP_Scene.SetBackgroundImageVertexColor(2, 0.1, 0.2, 0.2, 1.0)
HYP_Scene.SetBackgroundImageVertexColor(3, 0.1, 0.2, 0.2, 1.0)
HYP_Scene.GetBackgroundImageId
Returns the id of the background image.
: Lua - Python
id [INTEGER]: background image id.
:
id = HYP_Scene.GetBackgroundImageId()
HYP_Scene.SetRefGridSize
Sets the size of the reference grid.
: Lua - Python
width [REAL]: grid width.
height [REAL]: grid height.
:
HYP_Scene.SetRefGridSize(400.0, 400.0)
HYP_Scene.SetRefGridSubDivisions
Sets the number of subdivisions of the reference grid.
: Lua - Python
numSubDiv [INTEGER]: number of subdivisions.
:
HYP_Scene.SetRefGridSubDivisions(20)
HYP_Scene.PickMesh
Performs scene picking and returns the id of the mesh under the mouse (0 if no mesh).
: Lua - Python
meshId [INTEGER]: mesh id.
:
meshId = HYP_Scene.PickMesh()
HYP_Scene.LoadSkyboxFromFiles
Loads a skybox from 6 texture files.
: Lua - Python
xpos_face [STRING]: X positive texture file
xneg_face [STRING]: X negative texture file
ypos_face [STRING]: Y positive texture file
yneg_face [STRING]: Y negative texture file
zpos_face [STRING]: Z positive texture file
zneg_face [STRING]: Z negative texture file
id [INTEGER]: skybox identifier
:
id = HYP_Scene.LoadSkyboxFromFiles("f0.jpg", "f1.jpg", "f2.jpg", "f3.jpg", "f4.jpg", "f5.jpg")
HYP_Scene.SetSkyboxUVMapOp
Changes the uv mapping of a specific face of a skybox.
: Lua - Python
id [INTEGER]: skybox identifier
face [INTEGER]: face [0 ; 5]
op [INTEGER]: uv mapping: 1 (NO_SWAP), 2 (SWAP_U), 3 (SWAP_V), 4 (SWAP_UV)
:
face = 4
SWAP_U = 2
HYP_Scene.SetSkyboxUVMapOp(id, face, SWAP_U)
HYP_Scene.RayCast
performs a full scene ray casting and returns the id of the first mesh touched by the ray as well as three collision_point_{xyz}, the collision_face and collision_time. RayCast works only with meshes.
: Lua - Python
ray_orig_x, ray_orig_y, ray_orig_z [REAL]: origin of the ray
ray_dir_x, ray_dir_y, ray_dir_z [REAL]: directtion of the ray
meshId [INTEGER]: Id of the first mesh touched by the ray.
[]:
collision_face [INTEGER]: Index of the collision face of the mesh.
collision_time [REAL]: Normalized collision time.
:
meshId = HYP_Scene.RayCast(ray_orig_x, ray_orig_y, ray_orig_z, ray_dir_x, ray_dir_y, ray_dir_z)
|