| Constructor and Description |
|---|
JoGLLight(GL2 gl,
int index)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Color |
getAmbientColor()
Return the ambient color of this light;
|
Color |
getDiffuseColor()
Return the diffuse color of this light;
|
int |
getIndex()
Return the light index.
|
Vector3d |
getPosition()
Return the light position.
|
Color |
getSpecularColor()
Return the specular color of this light;
|
float |
getSpotAngle()
Return the spot angle.
|
Vector3d |
getSpotDirection()
Return the spot direction.
|
boolean |
isEnable()
Return the status of this light.
|
void |
reload(GL2 gl)
Reload this light.
|
void |
setAmbientColor(Color color)
Set the ambient color of this light.
|
void |
setDiffuseColor(Color color)
Set the diffuse color of this light.
|
void |
setEnable(boolean enable)
Set the status of this light.
|
void |
setPosition(Vector3d position)
Set the light position.
|
void |
setSpecularColor(Color color)
Set the specular color of this light.
|
void |
setSpotAngle(float angle)
Set the spot angle.
|
void |
setSpotDirection(Vector3d spotDirection)
Set the spot direction.
|
public JoGLLight(GL2 gl,
int index)
gl - the gl context.index - the light index.public void reload(GL2 gl)
gl - the gl context.public boolean isEnable()
Lightpublic void setEnable(boolean enable)
Lightpublic Color getAmbientColor()
LightgetAmbientColor in interface Lightpublic void setAmbientColor(Color color)
LightsetAmbientColor in interface Lightcolor - the new ambient color of this light.public Color getDiffuseColor()
LightgetDiffuseColor in interface Lightpublic void setDiffuseColor(Color color)
LightsetDiffuseColor in interface Lightcolor - the new diffuse color of this light.public Color getSpecularColor()
LightgetSpecularColor in interface Lightpublic void setSpecularColor(Color color)
LightsetSpecularColor in interface Lightcolor - the new specular color of this light.public Vector3d getPosition()
LightgetPosition in interface Lightpublic void setPosition(Vector3d position)
LightsetPosition in interface Lightposition - the new position.public Vector3d getSpotDirection()
LightgetSpotDirection in interface Lightpublic void setSpotDirection(Vector3d spotDirection)
LightsetSpotDirection in interface LightspotDirection - the new spot direction.public float getSpotAngle()
LightgetSpotAngle in interface Lightpublic void setSpotAngle(float angle)
LightsetSpotAngle in interface Lightangle - the new spot angle.