|
|||||||||
| 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
de.rico.engine.effect.light.ogllight.PositionalLight
de.rico.engine.effect.light.ogllight.SpotLight
public class SpotLight
This class represents an OpenGL spot light.
| Constructor Summary | |
|---|---|
SpotLight(int lightNumber)
Creates a new spot light with the specified number. |
|
| Method Summary | |
|---|---|
void |
bind(javax.media.opengl.GL gl)
Starts using the light. |
float |
getCutoff()
Returns the spot citoff |
Point3D |
getDirection()
Deprecated. I recommend to use the setRotX() and
setRotY() methods instead. They are a lot
easier to control. |
float |
getExponent()
Returns the spot exponent |
float |
getRotX()
Returns the degrees of ratation of the light along the x axis |
float |
getRotY()
Returns the degrees of ratation of the light along the y axis |
void |
setCutOff(float spotCutoff)
Sets the spot cutoff [0f,90f]. |
void |
setDirection(float x,
float y,
float z)
Deprecated. I recommend to use the setRotX() and
setRotY() methods instead. They are a lot
easier to control. |
void |
setDirection(Point3D direction)
Deprecated. I recommend to use the setRotX() and
setRotY() methods instead. They are a lot
easier to control. |
void |
setExponent(float spotExponent)
Sets the spot exponent of the spot light |
void |
setRotX(float rotation)
Sets the rotaton of the light along the x axis |
void |
setRotY(float rotation)
Sets the rotaton along the y axis of the light |
| Methods inherited from class de.rico.engine.effect.light.ogllight.PositionalLight |
|---|
getConstAttenuation, getLinearAttenuation, getPosition, getQuadraticAttenuation, setConstAttenuation, setLinearAttenuation, setPosition, setPosition, setQuadraticAttenuation, setShowLightPosition, setX, setY, setZ |
| Methods inherited from class de.rico.engine.effect.light.ogllight.AbstractLight |
|---|
destroy, getAmbient, getDiffuse, getLightNr, getLightNrOGLConst, getSpecular, isEnabled, release, setAmbient, setAmbient, setDiffuse, setDiffuse, setEnabled, setSpecular, setSpecular |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface de.rico.engine.effect.light.PositionalLightIface |
|---|
getPosition, setPosition, setPosition, setX, setY, setZ |
| Methods inherited from interface de.rico.engine.effect.light.LightIface |
|---|
destroy, release, setEnabled |
| Constructor Detail |
|---|
public SpotLight(int lightNumber)
lightNumber - light number from 0 to 7| Method Detail |
|---|
public void bind(javax.media.opengl.GL gl)
LightIface
bind in interface LightIfacebind in class PositionalLightpublic float getCutoff()
public void setCutOff(float spotCutoff)
spotCutoff - spotcutoff for the spot lightpublic float getExponent()
public void setExponent(float spotExponent)
spotExponent - spot exponent of the spot light@Deprecated public Point3D getDirection()
setRotX() and
setRotY() methods instead. They are a lot
easier to control.
@Deprecated
public void setDirection(float x,
float y,
float z)
setRotX() and
setRotY() methods instead. They are a lot
easier to control.
x - x-coordinatey - y-coordinatez - z-coordinate@Deprecated public void setDirection(Point3D direction)
setRotX() and
setRotY() methods instead. They are a lot
easier to control.
direction - direction of the spot lightpublic void setRotX(float rotation)
SpotLightIface
setRotX in interface SpotLightIfacerotation - degrees of rotationpublic void setRotY(float rotation)
SpotLightIface
setRotY in interface SpotLightIfacerotation - degrees of rotationpublic float getRotX()
SpotLightIface
getRotX in interface SpotLightIfacepublic float getRotY()
SpotLightIface
getRotY in interface SpotLightIface
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||