"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_Lighting Library


Description
Curve library

Number of functions: 17

HYP_Lighting.Create

Description
Creates a new light object.

Languages: Lua - Python

Return Values
  • lightId [INTEGER]: light identifier

    Code sample :

    lightId = HYP_Lighting.Create()


    HYP_Lighting.Destroy

    Description
    Destroys an existing light object.

    Languages: Lua - Python

    Parameters
  • lightId [INTEGER]: light identifier

    Code sample :

    HYP_Lighting.Destroy(lightId)


    HYP_Lighting.SetAmbient

    Description
    Sets light's ambient component.

    Languages: Lua - Python

    Parameters
  • lightId [INTEGER]: light identifier
  • r, g, b, a [REAL]: RGBA ambient channels.

    Code sample :

    HYP_Lighting.SetAmbient(lightId, 0.2, 0.2, 0.2, 1.0)


    HYP_Lighting.GetAmbient

    Description
    Gets light's ambient component.

    Languages: Lua - Python

    Parameters
  • lightId [INTEGER]: light identifier

    Return Values
  • r, g, b, a [REAL]: RGBA ambient channels.

    Code sample :

    r, g, b, a = HYP_Lighting.GetAmbient(lightId)


    HYP_Lighting.SetDiffuse

    Description
    Sets light's diffuse component.

    Languages: Lua - Python

    Parameters
  • lightId [INTEGER]: light identifier
  • r, g, b, a [REAL]: RGBA diffuse channels.

    Code sample :

    HYP_Lighting.SetDiffuse(lightId, 0.8, 0.8, 0.8, 1.0)


    HYP_Lighting.GetDiffuse

    Description
    Gets light's diffuse component.

    Languages: Lua - Python

    Parameters
  • lightId [INTEGER]: light identifier

    Return Values
  • r, g, b, a [REAL]: RGBA diffuse channels.

    Code sample :

    r, g, b, a = HYP_Lighting.GetDiffuse(lightId)


    HYP_Lighting.SetSpecular

    Description
    Sets light's specular component.

    Languages: Lua - Python

    Parameters
  • lightId [INTEGER]: light identifier
  • r, g, b, a [REAL]: RGBA specular channels.

    Code sample :

    HYP_Lighting.SetSpecular(lightId, 0.9, 0.9, 0.6, 1.0)


    HYP_Lighting.GetSpecular

    Description
    Gets light's specular component.

    Languages: Lua - Python

    Parameters
  • lightId [INTEGER]: light identifier

    Return Values
  • r, g, b, a [REAL]: RGBA specular channels.

    Code sample :

    r, g, b, a = HYP_Lighting.GetSpecular(lightId)


    HYP_Lighting.ApplyToRenderer

    Description
    Applies light properties to the renderer. This function is useful with render to texture or in direct rendering scripts.

    Languages: Lua - Python

    Parameters
  • lightId [INTEGER]: light identifier

    Code sample :

    HYP_Lighting.ApplyToRenderer(lightId)


    HYP_Lighting.SetConstantAttFactor

    Description
    Changes the value of the light constant attenuation factor proportionately to the distance from the vertex being currently processed.

    Languages: Lua

    Parameters
  • lightId [INTEGER]: light identifier
  • att [REAL]: attenuation factor

    Code sample :

    HYP_Lighting.SetConstantAttFactor(lightId, 0.5)


    HYP_Lighting.SetLinearAttFactor

    Description
    Changes the value of the light linear attenuation factor proportionately to the distance from the vertex being currently processed.

    Languages: Lua

    Parameters
  • lightId [INTEGER]: light identifier
  • att [REAL]: attenuation factor

    Code sample :

    HYP_Lighting.SetLinearAttFactor(lightId, 0.01)


    HYP_Lighting.SetQuadraticAttFactor

    Description
    Changes the value of the light quadratic attenuation factor proportionately to the distance from the vertex being currently processed.

    Languages: Lua

    Parameters
  • lightId [INTEGER]: light identifier
  • att [REAL]: attenuation factor

    Code sample :

    HYP_Lighting.SetQuadraticAttFactor(lightId, 0.0001)


    HYP_Lighting.SetSpotCutOff

    Description
    Sets the aperture angle of light's cone in case of a spot light.

    Languages: Lua

    Parameters
  • lightId [INTEGER]: light identifier
  • angle [REAL]: angle in degrees of the light cone aperture.

    Code sample :

    HYP_Lighting.SetSpotCutOff(lightId, 30.0)


    HYP_Lighting.GetSpotCutOff

    Description
    Gets the aperture angle of light's cone in case of a spot light.

    Languages: Lua

    Parameters
  • lightId [INTEGER]: light identifier

    Return Values
  • angle [REAL]: angle in degrees of the light cone aperture.

    Code sample :

    angle = HYP_Lighting.GetSpotCutOff(lightId)


    HYP_Lighting.GetNumLights

    Description
    Returns the number of existing lights (XML or script).

    Languages: Lua

    Return Values
  • n [INTEGER]: number of lights.

    Code sample :

    n = HYP_Lighting.GetNumLights()


    HYP_Lighting.GetIdByIndex

    Description
    Returns a light ight according to its position in the lights list.

    Languages: Lua

    Parameters
  • lightIndex [INTEGER]: light index. Range: [0 to GetNumLights()-1]

    Return Values
  • lightId [INTEGER]: light identifier.

    Code sample :

    lightId = HYP_Lighting.GetIdByIndex(0)


    HYP_Lighting.SetShadowEmitterState

    Description
    Allows to specify whether a light is a source for shadow or not.

    Languages: Lua

    Parameters
  • lightId [INTEGER]: light identifier
  • state [INTEGER]: state: 1 or 0.

    Code sample :

    HYP_Lighting.SetShadowEmitterState(lightId, 0);




  • Random Projects

    Pixelation PostFX
    Pixelation PostFX

    Posterization Effect
    Posterization Effect

    Blender Object Viewer
    Blender Object Viewer


    Random Code Samples

    Bloom PostFX
    Bloom PostFX

    Python - NetworkX
    Python - NetworkX

    Shadow Mapping
    Shadow Mapping



    (C)2009-2010 Geeks3D.com