All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.media.j3d.Light

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

public abstract class Light
extends Leaf
Light is an abstract class containing instance variable common to all lights.


Variable Index

 o ALLOW_COLOR_READ
Specifies that this Light allows read access to its color information at runtime.
 o ALLOW_COLOR_WRITE
Specifies that this Light allows write access to its color information at runtime.
 o ALLOW_INFLUENCING_BOUNDS_READ
Specifies that this Light allows read access to its influencing bounds and bounds leaf information.
 o ALLOW_INFLUENCING_BOUNDS_WRITE
Specifies that this Light allows write access to its influencing bounds and bounds leaf information.
 o ALLOW_STATE_READ
Specifies that this Light allows read access to its current state information at runtime.
 o ALLOW_STATE_WRITE
Specifies that this Light allows write access to its current state information at runtime.

Constructor Index

 o Light()
Constructs and initializes a light using default parameters.
 o Light(boolean, Color3f)
Constructs and initializes a light using the specified parameters.
 o Light(Color3f)
Constructs and initializes a light using the specified parameters.

Method Index

 o addScope(Group)
Appends the specified scope to this node's list of scopes.
 o getAllScopes()
Returns an Enumeration object of all scopes.
 o getColor(Color3f)
Gets this Light's current color and places it in the parameter specified.
 o getEnable()
Retrieves this Light's current state (on/off).
 o getInfluencingBoundingLeaf()
Retrieves the Light node's influencing bounding leaf.
 o getInfluencingBounds()
Retrieves the Light node's influencing bounds.
 o getScope(int)
Retrieves this Light's scope at the index specified.
 o insertScope(Group, int)
Inserts the scope specified by the group node at the specified index location.
 o numScopes()
Returns a count of this lights' scopes.
 o removeScope(int)
Removes the node's scope at the specified index location.
 o setColor(Color3f)
Sets the Light's current color.
 o setEnable(boolean)
Turns the light on or off.
 o setInfluencingBoundingLeaf(BoundingLeaf)
Sets the Light's influencing region to the specified bounding leaf.
 o setInfluencingBounds(Bounds)
Sets the Light's influencing region to the specified bounds.
 o setScope(Group, int)
Sets the Light's hierarchical scope at the index specified By default, lights are scoped only by their region of influence bounds.

Variables

 o ALLOW_STATE_READ
 public static final int ALLOW_STATE_READ
Specifies that this Light allows read access to its current state information at runtime.

 o ALLOW_STATE_WRITE
 public static final int ALLOW_STATE_WRITE
Specifies that this Light allows write access to its current state information at runtime.

 o ALLOW_COLOR_READ
 public static final int ALLOW_COLOR_READ
Specifies that this Light allows read access to its color information at runtime.

 o ALLOW_COLOR_WRITE
 public static final int ALLOW_COLOR_WRITE
Specifies that this Light allows write access to its color information at runtime.

 o ALLOW_INFLUENCING_BOUNDS_READ
 public static final int ALLOW_INFLUENCING_BOUNDS_READ
Specifies that this Light allows read access to its influencing bounds and bounds leaf information.

 o ALLOW_INFLUENCING_BOUNDS_WRITE
 public static final int ALLOW_INFLUENCING_BOUNDS_WRITE
Specifies that this Light allows write access to its influencing bounds and bounds leaf information.

Constructors

 o Light
 public Light()
Constructs and initializes a light using default parameters.

 o Light
 public Light(Color3f color)
Constructs and initializes a light using the specified parameters.

Parameters:
color - the color of the light source
 o Light
 public Light(boolean lightOn,
              Color3f color)
Constructs and initializes a light using the specified parameters.

Parameters:
lightOn - flag indicating whether this light is on or off
color - the color of the light source

Methods

 o setEnable
 public final void setEnable(boolean state)
Turns the light on or off.

Parameters:
state - true or false to set light on or off
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o getEnable
 public final boolean getEnable()
Retrieves this Light's current state (on/off).

Returns:
this node's current state (on/off)
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o setColor
 public final void setColor(Color3f color)
Sets the Light's current color.

Parameters:
color - the value of this node's new color
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o getColor
 public final void getColor(Color3f color)
Gets this Light's current color and places it in the parameter specified.

Parameters:
color - the vector that will receive this node's color
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o setScope
 public final void setScope(Group scope,
                            int index)
Sets the Light's hierarchical scope at the index specified By default, lights are scoped only by their region of influence bounds. This allows them to be further scoped * by a node in the hierarchy.

Parameters:
scope - the Group node that defines this Light's scope
index - the index which group node to replace.
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o getScope
 public final Group getScope(int index)
Retrieves this Light's scope at the index specified.

Parameters:
index - which scope to return
Returns:
the Group node that defines this Light's scope
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o insertScope
 public final void insertScope(Group scope,
                               int index)
Inserts the scope specified by the group node at the specified index location.

Parameters:
scope - the new scope
index - at which location to insert
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o removeScope
 public final void removeScope(int index)
Removes the node's scope at the specified index location.

Parameters:
index - which scope to remove
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o getAllScopes
 public final Enumeration getAllScopes()
Returns an Enumeration object of all scopes.

Returns:
an Enumeration object of all the scopes
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o addScope
 public final void addScope(Group scope)
Appends the specified scope to this node's list of scopes.

Parameters:
scope - the scope to add to this node's list of scopes
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o numScopes
 public final int numScopes()
Returns a count of this lights' scopes.

Returns:
the number of scopes for this light..
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o setInfluencingBounds
 public final void setInfluencingBounds(Bounds region)
Sets the Light's influencing region to the specified bounds. This is used when the influencing bounding leaf is set to null.

Parameters:
region - the bounds that contains the Light's new influencing region.
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o getInfluencingBounds
 public final Bounds getInfluencingBounds()
Retrieves the Light node's influencing bounds.

Returns:
this Light's influencing bounds information
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o setInfluencingBoundingLeaf
 public final void setInfluencingBoundingLeaf(BoundingLeaf region)
Sets the Light's influencing region to the specified bounding leaf. When set to a value other than null, this overrides the influencing bounds object.

Parameters:
region - the bounding leaf node used to specify the Light node's new influencing region.
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o getInfluencingBoundingLeaf
 public final BoundingLeaf getInfluencingBoundingLeaf()
Retrieves the Light node's influencing bounding leaf.

Returns:
this Light's influencing bounding leaf information
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