Class Light

java.lang.Object
  |
  +--Light

public class Light
extends Object
implements Cloneable

Represents a light source in 3D Space.

Author:
sasmito Adibowo

Field Summary
(package private)  Color color
          The light's color.
static int MARK_RADIUS
          The light marker's radius.
protected  String name
          The light's name.
protected  Point3D position
          The light's position.
 
Constructor Summary
Light(String name, Point3D pos, Color col)
           
 
Method Summary
 Object clone()
          Performs a shallow copy of the light object.
 Color getColor()
          Returns the color of the light.
 Point3D getPosition()
          Returns the position of the light.
 void setPosition(Point3D pt)
          Sets the position of the light.
 String toString()
           
 
Methods inherited from class java.lang.Object
, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

position

protected Point3D position
The light's position.

color

Color color
The light's color.

name

protected String name
The light's name.

MARK_RADIUS

public static final int MARK_RADIUS
The light marker's radius.
Constructor Detail

Light

public Light(String name,
             Point3D pos,
             Color col)
Method Detail

getPosition

public Point3D getPosition()
Returns the position of the light.

getColor

public Color getColor()
Returns the color of the light.

setPosition

public void setPosition(Point3D pt)
Sets the position of the light.
Parameters:
pt - the new position.

clone

public Object clone()
Performs a shallow copy of the light object.
Overrides:
clone in class Object

toString

public String toString()
Overrides:
toString in class Object