Class Light

java.lang.Object
  extended by Light
All Implemented Interfaces:
CloneableEx, java.lang.Cloneable, Persistent

public class Light
extends java.lang.Object
implements Persistent, CloneableEx

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

Light

public Light()

Light

public Light(Light light)
Performs a deep copy of the specified Light object.

Parameters:
light - The Light object to copy.

Light

public Light(javax.vecmath.Point3d position,
             javax.vecmath.Color3f color,
             double radius)
Constructs a new point light with the specified parameters.

Parameters:
position - The position of the light.
color - The color of the light.
radius - The radius the light extends. This parameter is unused.
Method Detail

clone

public java.lang.Object clone()
Description copied from interface: CloneableEx
Returns a copy of the object.

Specified by:
clone in interface CloneableEx
Overrides:
clone in class java.lang.Object
Returns:
A copy of the object.

load

public void load(DataParser dataParser)
Description copied from interface: Persistent
Loads data using the DataParser object.

A class overrides this function to load data that has been parsed.

Specified by:
load in interface Persistent
Parameters:
dataParser - The DataParser to load data from.

setPosition

public void setPosition(javax.vecmath.Point3d position)
Sets the position of the light.

Parameters:
position - The position to set.

getPosition

public javax.vecmath.Point3d getPosition()
Returns the position of the light.

Returns:
The position of the light.

setColor

public void setColor(javax.vecmath.Color3f color)
Sets the color of the light.

Parameters:
color - The color to set.

getColor

public javax.vecmath.Color3f getColor()
Returns the color of the light.

Returns:
The color of the light.

setRadius

public void setRadius(double radius)
Sets the radius of the light.

Parameters:
radius - The radius to set.

getRadius

public double getRadius()
Returns the radius of the light.

Returns:
The radius of the light.