"No one can be told what GeeXLab is, you have to see it for yourself!"

"Stop Playing Games and Start Making Them! With GeeXLab, your are on your way!"


Quick Links
What is GeeXLab
Download GeeXLab
GeeXLab Requirements
Online Help
Articles and Tutorials
Samples Screenshots
Videos

GeeXLab Changelog

XML Ref. Guide
Scripting Ref. Guide
Code Samples

Purchase GeeXLab
GeeXLab SDK

Shader Library

Follow GeeXLab's News
GeeXLab news, articles, tutorials and demos @ Geeks3D.com
GeeXLab @ Twitter GeeXLab RSS Feed

Subscribe to GeeXLab news by email

[ Back to Geeks3D.com ]

GeeXLab

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


Description
Scene library

Number of functions: 10

HYP_Scene.GetWindowSize

Description
Returns the window size.

Languages: Lua - Python

Return Values
  • w [INTEGER]: width
  • h [INTEGER]: height

    Code sample :

    w, h = HYP_Scene.GetWindowSize()


    HYP_Scene.SetBackgroundColor

    Description
    Sets the background color.

    Languages: Lua - Python

    Parameters
  • r, g, b [REAL]: RGB color of the background.

    Code sample :

    HYP_Scene.SetBackgroundColor(r, g, b)


    HYP_Scene.SetBackgroundImageVertexColor

    Description
    Sets the vertex color of background image.

    Languages: Lua - Python

    Parameters
  • vertexIndex [INTEGER]: index of the vertex. - Values = 0|1|2|3
  • r, g, b, a [REAL]: RGBA color of the vertex.

    Code sample :

    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

    Description
    Returns the id of the background image.

    Languages: Lua - Python

    Return Values
  • id [INTEGER]: background image id.

    Code sample :

    id = HYP_Scene.GetBackgroundImageId()


    HYP_Scene.SetRefGridSize

    Description
    Sets the size of the reference grid.

    Languages: Lua - Python

    Parameters
  • width [REAL]: grid width.
  • height [REAL]: grid height.

    Code sample :

    HYP_Scene.SetRefGridSize(400.0, 400.0)


    HYP_Scene.SetRefGridSubDivisions

    Description
    Sets the number of subdivisions of the reference grid.

    Languages: Lua - Python

    Parameters
  • numSubDiv [INTEGER]: number of subdivisions.

    Code sample :

    HYP_Scene.SetRefGridSubDivisions(20)


    HYP_Scene.PickMesh

    Description
    Performs scene picking and returns the id of the mesh under the mouse (0 if no mesh).

    Languages: Lua - Python

    Return Values
  • meshId [INTEGER]: mesh id.

    Code sample :

    meshId = HYP_Scene.PickMesh()


    HYP_Scene.LoadSkyboxFromFiles

    Description
    Loads a skybox from 6 texture files.

    Languages: Lua - Python

    Parameters
  • 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

    Return Values
  • id [INTEGER]: skybox identifier

    Code sample :

    id = HYP_Scene.LoadSkyboxFromFiles("f0.jpg", "f1.jpg", "f2.jpg", "f3.jpg", "f4.jpg", "f5.jpg")


    HYP_Scene.SetSkyboxUVMapOp

    Description
    Changes the uv mapping of a specific face of a skybox.

    Languages: Lua - Python

    Parameters
  • 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)

    Code sample :

    face = 4
    SWAP_U = 2
    HYP_Scene.SetSkyboxUVMapOp(id, face, SWAP_U)


    HYP_Scene.RayCast

    Description
    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.

    Languages: Lua - Python

    Parameters
  • 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

    Return Values
  • 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.

    Code sample :

    meshId = HYP_Scene.RayCast(ray_orig_x, ray_orig_y, ray_orig_z, ray_dir_x, ray_dir_y, ray_dir_z)




  • Random Projects

    Pixelation PostFX
    Pixelation PostFX

    Thermal Vision PostFX
    Thermal Vision PostFX

    Depth Buffer Visualization
    Depth Buffer Visualization


    Random Code Samples

    DirectX Format Loading
    DirectX Format Loading

    Anaglyph Stereoscopic 3D
    Anaglyph Stereoscopic 3D

    3D Curve
    3D Curve



    (C)2009-2010 Geeks3D.com