|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectLight
public class Light
A class representing a light. A light is specified by it's position, color, and radius.
Constructor Summary | |
---|---|
Light()
|
|
Light(Light light)
Performs a deep copy of the specified Light object. |
|
Light(javax.vecmath.Point3d position,
javax.vecmath.Color3f color,
double radius)
Constructs a new point light with the specified parameters. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Returns a copy of the object. |
javax.vecmath.Color3f |
getColor()
Returns the color of the light. |
javax.vecmath.Point3d |
getPosition()
Returns the position of the light. |
double |
getRadius()
Returns the radius of the light. |
void |
load(DataParser dataParser)
Loads data using the DataParser object. |
void |
setColor(javax.vecmath.Color3f color)
Sets the color of the light. |
void |
setPosition(javax.vecmath.Point3d position)
Sets the position of the light. |
void |
setRadius(double radius)
Sets the radius of the light. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Light()
public Light(Light light)
Light
object.
light
- The Light
object to copy.public Light(javax.vecmath.Point3d position, javax.vecmath.Color3f color, double radius)
position
- The position of the light.color
- The color of the light.radius
- The radius the light extends. This parameter is unused.Method Detail |
---|
public java.lang.Object clone()
CloneableEx
clone
in interface CloneableEx
clone
in class java.lang.Object
public void load(DataParser dataParser)
Persistent
DataParser
object.
A class overrides this function to load data that has been parsed.
load
in interface Persistent
dataParser
- The DataParser
to load data from.public void setPosition(javax.vecmath.Point3d position)
position
- The position to set.public javax.vecmath.Point3d getPosition()
public void setColor(javax.vecmath.Color3f color)
color
- The color to set.public javax.vecmath.Color3f getColor()
public void setRadius(double radius)
radius
- The radius to set.public double getRadius()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |