|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.rico.engine.effect.light.ogllight.AbstractLight
public abstract class AbstractLight
Abstract base class for OpenGL based lighting.
Constructor Summary | |
---|---|
AbstractLight(int lightNumber)
Creates a new light with the specified light number |
Method Summary | |
---|---|
void |
bind(javax.media.opengl.GL gl)
Starts using the light. |
void |
destroy()
Destroys the light. |
Color4f |
getAmbient()
Returns the ambient color |
Color4f |
getDiffuse()
Returns the diffuse color |
int |
getLightNr()
Returns the light number in its representation of a value from 0 to 7 |
int |
getLightNrOGLConst()
Returns the light number in its representation as an OpenGL constant from GL.GL_LIGHT0 to GL.GL_LIGHT7 |
Color4f |
getSpecular()
Returns the specular color |
boolean |
isEnabled()
Determines whether the light is enabled. |
void |
release(javax.media.opengl.GL gl)
Stops using the light. |
void |
setAmbient(Color4f ambient)
Sets the ambient color of the light |
void |
setAmbient(float red,
float green,
float blue,
float alpha)
Sets the ambient color of the light |
void |
setDiffuse(Color4f diffuse)
Sets the diffuse color of the light |
void |
setDiffuse(float red,
float green,
float blue,
float alpha)
Sets the diffuse color of the light |
void |
setEnabled(boolean enable)
Enables or disables the light source |
void |
setSpecular(Color4f spec)
Sets the specular color of the light |
void |
setSpecular(float red,
float green,
float blue,
float alpha)
Sets the specular color of the light |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractLight(int lightNumber)
lightNumber
- light number from 0 to 7Method Detail |
---|
public void bind(javax.media.opengl.GL gl)
LightIface
bind
in interface LightIface
public void release(javax.media.opengl.GL gl)
LightIface
release
in interface LightIface
public void destroy()
LightIface
destroy
in interface LightIface
public int getLightNr()
public int getLightNrOGLConst()
public void setAmbient(float red, float green, float blue, float alpha)
red
- amount of redgreen
- amount of greenblue
- amount of bluealpha
- alpha valuepublic void setAmbient(Color4f ambient)
ambient
- ambient colorpublic void setDiffuse(float red, float green, float blue, float alpha)
red
- amount of redgreen
- amount of greenblue
- amount of bluealpha
- alpha valuepublic void setDiffuse(Color4f diffuse)
diffuse
- diffuse colorpublic void setSpecular(float red, float green, float blue, float alpha)
red
- amount of redgreen
- amount of greenblue
- amount of bluealpha
- alpha valuepublic void setSpecular(Color4f spec)
spec
- specular colorpublic Color4f getAmbient()
public Color4f getDiffuse()
public Color4f getSpecular()
public void setEnabled(boolean enable)
LightIface
setEnabled
in interface LightIface
enable
- true --> enable light, false --> disable lightpublic boolean isEnabled()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |