|
||||||||||
| 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.opengl.renderobjects.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
|
private float[][] |
points
|
private float[] |
position
|
private float[] |
shadowMatrix
|
private static float |
SHADOWPLANE_HEIGHT
|
private static float |
SHADOWPLANE_X0
|
private static float |
SHADOWPLANE_X1
|
private static float |
SHADOWPLANE_X2
|
private static float |
SHADOWPLANE_Z0
|
private static float |
SHADOWPLANE_Z1
|
private static float |
SHADOWPLANE_Z2
|
private float[] |
translation
|
private static int |
VEC3SIZE
|
private static int |
VEC4SIZE
|
private VJoint |
vjoint
|
| Constructor Summary | |
|---|---|
SimpleLight(int gl_light,
String name)
common initialization for new DirectionalLights. |
|
| 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 static final int VEC3SIZE
private static final int VEC4SIZE
private static final float SHADOWPLANE_HEIGHT
private static final float SHADOWPLANE_X0
private static final float SHADOWPLANE_Z0
private static final float SHADOWPLANE_X1
private static final float SHADOWPLANE_Z1
private static final float SHADOWPLANE_X2
private static final float SHADOWPLANE_Z2
private SimpleLightGeometry glGeometry
private SimpleLightState glState
private VJoint vjoint
private float[] translation
private float[] position
private float[] shadowMatrix
private float[][] points
| Constructor Detail |
|---|
public SimpleLight(int gl_light,
String name)
| 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 | |||||||||