All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.media.j3d.SpotLight

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

public class SpotLight
extends PointLight
SpotLight is a API part of a spot light object.


Variable Index

 o ALLOW_CONCENTRATION_READ
Specifies that the Node allows reading to its spot lights concentration information.
 o ALLOW_CONCENTRATION_WRITE
Specifies that the Node allows writing to its spot lights concentration information.
 o ALLOW_DIRECTION_READ
Specifies that the Node allows reading to its spot lights direction information.
 o ALLOW_DIRECTION_WRITE
Specifies that the Node allows writing to its spot lights direction information.
 o ALLOW_SPREAD_ANGLE_READ
Specifies that the Node allows reading to its spot lights spread angle information.
 o ALLOW_SPREAD_ANGLE_WRITE
Specifies that the Node allows writing to its spot lights spread angle information.

Constructor Index

 o SpotLight()
Constructs and initializes a spot light source.
 o SpotLight(boolean, Color3f, Point3f, Point3f, Vector3f, float, float)
Constructs and initializes a spot light.
 o SpotLight(Color3f, Point3f, Point3f, Vector3f, float, float)
Constructs and initializes a spot light.

Method Index

 o getConcentration()
Get spot light concentration.
 o getDirection(Vector3f)
Gets this Light's current direction and places it in the parameter specified.
 o getSpreadAngle()
Get spot light spread angle.
 o setConcentration(float)
Set spot light concentration.
 o setDirection(float, float, float)
Set light direction.
 o setDirection(Vector3f)
Sets this Light's current direction and places it in the parameter specified.
 o setSpreadAngle(float)
Set spot light spread angle.

Variables

 o ALLOW_SPREAD_ANGLE_WRITE
 public static final int ALLOW_SPREAD_ANGLE_WRITE
Specifies that the Node allows writing to its spot lights spread angle information.

 o ALLOW_SPREAD_ANGLE_READ
 public static final int ALLOW_SPREAD_ANGLE_READ
Specifies that the Node allows reading to its spot lights spread angle information.

 o ALLOW_CONCENTRATION_WRITE
 public static final int ALLOW_CONCENTRATION_WRITE
Specifies that the Node allows writing to its spot lights concentration information.

 o ALLOW_CONCENTRATION_READ
 public static final int ALLOW_CONCENTRATION_READ
Specifies that the Node allows reading to its spot lights concentration information.

 o ALLOW_DIRECTION_WRITE
 public static final int ALLOW_DIRECTION_WRITE
Specifies that the Node allows writing to its spot lights direction information.

 o ALLOW_DIRECTION_READ
 public static final int ALLOW_DIRECTION_READ
Specifies that the Node allows reading to its spot lights direction information.

Constructors

 o SpotLight
 public SpotLight()
Constructs and initializes a spot light source.

 o SpotLight
 public SpotLight(Color3f color,
                  Point3f position,
                  Point3f attenuation,
                  Vector3f direction,
                  float spreadAngle,
                  float concentration)
Constructs and initializes a spot light.

Parameters:
color - the color of the light source
position - the position of the light in three-space
attenuation - (constant, linear, quadratic)
direction - the direction of the light
spreadAngle - the spread angle of the light
concentration - the concentration of the light
 o SpotLight
 public SpotLight(boolean lightOn,
                  Color3f color,
                  Point3f position,
                  Point3f attenuation,
                  Vector3f direction,
                  float spreadAngle,
                  float concentration)
Constructs and initializes a spot light.

Parameters:
lightOn - flag indicating whether this light is on or off
color - the color of the light source
position - the position of the light in three-space
attenuation - the attenuation (constant, linear, quadratic) of the light
direction - the direction of the light
spreadAngle - the spread angle of the light
concentration - the concentration of the light

Methods

 o setSpreadAngle
 public final void setSpreadAngle(float spreadAngle)
Set spot light spread angle.

Parameters:
spreadAngle - the new spread angle for spot light
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o getSpreadAngle
 public final float getSpreadAngle()
Get spot light spread angle.

Returns:
the new spread angle for spot light
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o setConcentration
 public final void setConcentration(float concentration)
Set spot light concentration.

Parameters:
concentration - the new concentration for spot light
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o getConcentration
 public final float getConcentration()
Get spot light concentration.

Returns:
the new concentration for spot light
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 setDirection
 public final void setDirection(Vector3f direction)
Sets this Light's current direction and places it in the parameter specified.

Parameters:
position - 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
 o getDirection
 public final void getDirection(Vector3f direction)
Gets this Light's current direction and places it in the parameter specified.

Parameters:
position - 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