All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.media.j3d.DirectionalLight

java.lang.Object
   |
   +----java.media.j3d.SceneGraphObject
           |
           +----java.media.j3d.Node
                   |
                   +----java.media.j3d.Leaf
                           |
                           +----java.media.j3d.Light
                                   |
                                   +----java.media.j3d.DirectionalLight

public class DirectionalLight
extends Light
DirectionalLight is the API part of a directional light object.


Variable Index

 o ALLOW_DIRECTION_READ
Specifies that the Node allows access to its object's direction information.
 o ALLOW_DIRECTION_WRITE
Specifies that the Node allows writing to its object's direction information.

Constructor Index

 o DirectionalLight()
Constructs and initializes a directional light.
 o DirectionalLight(boolean, Color3f, Vector3f)
Constructs and initializes a directional light.
 o DirectionalLight(Color3f, Vector3f)
Constructs and initializes a directional light.

Method Index

 o getDirection(Vector3f)
Gets this Light's current direction and places it in the parameter specified.
 o setDirection(float, float, float)
Set light direction.
 o setDirection(Vector3f)
Set light direction.

Variables

 o ALLOW_DIRECTION_READ
 public static final int ALLOW_DIRECTION_READ
Specifies that the Node allows access to its object's direction information.

 o ALLOW_DIRECTION_WRITE
 public static final int ALLOW_DIRECTION_WRITE
Specifies that the Node allows writing to its object's direction information.

Constructors

 o DirectionalLight
 public DirectionalLight()
Constructs and initializes a directional light. The default direction is toward the screen, along the negitive z axis.

 o DirectionalLight
 public DirectionalLight(Color3f color,
                         Vector3f direction)
Constructs and initializes a directional light.

Parameters:
color - the color of the light source
direction - the direction vector pointing from the light to the object
 o DirectionalLight
 public DirectionalLight(boolean lightOn,
                         Color3f color,
                         Vector3f direction)
Constructs and initializes a directional light.

Parameters:
lightOn - flag indicating whether this light is on or off
color - the color of the light source
direction - the direction vector pointing from the light to the object

Methods

 o setDirection
 public final void setDirection(Vector3f direction)
Set light direction.

Parameters:
direction - the new direction
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o setDirection
 public final void setDirection(float x,
                                float y,
                                float z)
Set light direction.

Parameters:
x - the new X direction
y - the new Y direction
z - the new Z direction
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o getDirection
 public final void getDirection(Vector3f direction)
Gets this Light's current direction and places it in the parameter specified.

Parameters:
direction - the vector that will receive this node's direction
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph

All Packages  Class Hierarchy  This Package  Previous  Next  Index