All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.media.j3d.PointLight

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

public class PointLight
extends Light
The PointLight object specifies an attenuated light source at a fixed point in space that radiates light equally in all directions away from the light source.


Variable Index

 o ALLOW_ATTENUATION_READ
Specifies that this PointLight node allows reading its attenuation information.
 o ALLOW_ATTENUATION_WRITE
Specifies that this PointLight node allows writing its attenuation information.
 o ALLOW_POSITION_READ
Specifies that this PointLight node allows reading its position information.
 o ALLOW_POSITION_WRITE
Specifies that this PointLight node allows writing its position information.

Constructor Index

 o PointLight()
Constructs and initializes a point light source.
 o PointLight(boolean, Color3f, Point3f, Point3f)
Constructs and initializes a point light.
 o PointLight(Color3f, Point3f, Point3f)
Constructs and initializes a point light.

Method Index

 o getAttenuation(Point3f)
Gets this Light's current attenuation values and places it in the parameter specified.
 o getPosition(Point3f)
Gets this Light's current position and places it in the parameter specified.
 o setAttenuation(float, float, float)
Sets this Light's current attenuation values and places it in the parameter specified.
 o setAttenuation(Point3f)
Sets this Light's current attenuation values and places it in the parameter specified.
 o setPosition(float, float, float)
Set light position.
 o setPosition(Point3f)
Set light position.

Variables

 o ALLOW_POSITION_READ
 public static final int ALLOW_POSITION_READ
Specifies that this PointLight node allows reading its position information.

 o ALLOW_POSITION_WRITE
 public static final int ALLOW_POSITION_WRITE
Specifies that this PointLight node allows writing its position information.

 o ALLOW_ATTENUATION_READ
 public static final int ALLOW_ATTENUATION_READ
Specifies that this PointLight node allows reading its attenuation information.

 o ALLOW_ATTENUATION_WRITE
 public static final int ALLOW_ATTENUATION_WRITE
Specifies that this PointLight node allows writing its attenuation information.

Constructors

 o PointLight
 public PointLight()
Constructs and initializes a point light source. The default position is at (0,0,0).

 o PointLight
 public PointLight(Color3f color,
                   Point3f position,
                   Point3f attenuation)
Constructs and initializes a point light.

Parameters:
color - the color of the light source
position - the position of the light in three-space
attenuation - the attenutation (constant, linear, quadratic) of the light
 o PointLight
 public PointLight(boolean lightOn,
                   Color3f color,
                   Point3f position,
                   Point3f attenuation)
Constructs and initializes a point 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

Methods

 o setPosition
 public final void setPosition(Point3f position)
Set light position.

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

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

Parameters:
position - the vector that will receive this node's position
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o setAttenuation
 public final void setAttenuation(Point3f attenuation)
Sets this Light's current attenuation values and places it in the parameter specified.

Parameters:
attenuation - the vector that will receive the attenuation values
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o setAttenuation
 public final void setAttenuation(float constant,
                                  float linear,
                                  float quadratic)
Sets this Light's current attenuation values and places it in the parameter specified.

Parameters:
constant - the light's constant attenuation
linear - the light's linear attenuation
quadratic - the light's quadratic attenuation
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o getAttenuation
 public final void getAttenuation(Point3f attenuation)
Gets this Light's current attenuation values and places it in the parameter specified.

Parameters:
attenuation - the vector that will receive the attenuation values
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