| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthmi.graphics.opengl.scenegraph.VGLNode
hmi.graphics.util.basicobjects.SimpleLight
public class SimpleLight
A basic positional or directional light object. The assumption is that color attributes, and position or direction are set during initialization, and that the light is permanently bound to one of the fixed OpenGL lights. The position is passed to OpenGL for every render call, so that it will take the ModelView transform into account.
| Field Summary | |
|---|---|
private  SimpleLightGeometry | 
glGeometry
 | 
private  SimpleLightState | 
glState
 | 
(package private)  float[][] | 
points
 | 
private  float[] | 
position
 | 
(package private)  float[] | 
shadowMatrix
 | 
private  float[] | 
translation
 | 
private  VJoint | 
vjoint
 | 
| Constructor Summary | |
|---|---|
SimpleLight(int gl_light,
            String name)
common initialization for new DirectionalLights.  | 
|
SimpleLight(int gl_light,
            String name,
            boolean visible)
 | 
|
| Method Summary | |
|---|---|
 SimpleLightGeometry | 
getGeometry()
 | 
 float[] | 
getPosition()
Returns a reference to the position float array of this light  | 
 SimpleLightState | 
getState()
 | 
 void | 
glInit(GLRenderContext glc)
called during initialization phase of the renderer.  | 
 void | 
glRender(GLRenderContext glc)
Rendering a light means: set position, taking into account the current ModelView transformation.  | 
 void | 
setDirection(float x,
             float y,
             float z)
Turns the light into a direction light, and sets the direction from which the light is shining.  | 
 void | 
setPosition(float[] pos)
Turns the light into a positional light, and sets the position from which the light is shining.  | 
 void | 
setPosition(float x,
            float y,
            float z)
Turns the light into a positional light, and sets the position from which the light is shining.  | 
 void | 
setShadowMatrix(float[] matrix)
 | 
 void | 
setShadowPlane(float x0,
               float y0,
               float z0,
               float x1,
               float y1,
               float z1,
               float x2,
               float y2,
               float z2)
 | 
| Methods inherited from class hmi.graphics.opengl.scenegraph.VGLNode | 
|---|
addChild, addGLShape, addMarker, addMarker, getGLShapeList, getRoot, prependGLShape, toString | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
private SimpleLightGeometry glGeometry
private SimpleLightState glState
private VJoint vjoint
private float[] translation
private float[] position
float[] shadowMatrix
float[][] points
| Constructor Detail | 
|---|
public SimpleLight(int gl_light,
                   String name)
public SimpleLight(int gl_light,
                   String name,
                   boolean visible)
| Method Detail | 
|---|
public SimpleLightState getState()
public SimpleLightGeometry getGeometry()
public void setPosition(float x,
                        float y,
                        float z)
public void setPosition(float[] pos)
public float[] getPosition()
public void setDirection(float x,
                         float y,
                         float z)
public void setShadowMatrix(float[] matrix)
public void glInit(GLRenderContext glc)
glInit in interface GLRenderObjectglInit in class VGLNodepublic void glRender(GLRenderContext glc)
glRender in interface GLRenderObjectglRender in class VGLNode
public void setShadowPlane(float x0,
                           float y0,
                           float z0,
                           float x1,
                           float y1,
                           float z1,
                           float x2,
                           float y2,
                           float z2)
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||