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.
-
ALLOW_ATTENUATION_READ
- Specifies that this PointLight node allows reading its attenuation
information.
-
ALLOW_ATTENUATION_WRITE
- Specifies that this PointLight node allows writing its attenuation
information.
-
ALLOW_POSITION_READ
- Specifies that this PointLight node allows reading its position
information.
-
ALLOW_POSITION_WRITE
- Specifies that this PointLight node allows writing its position
information.
-
PointLight()
- Constructs and initializes a point light source.
-
PointLight(boolean, Color3f, Point3f, Point3f)
- Constructs and initializes a point light.
-
PointLight(Color3f, Point3f, Point3f)
- Constructs and initializes a point light.
-
getAttenuation(Point3f)
- Gets this Light's current attenuation values and places it in the parameter specified.
-
getPosition(Point3f)
- Gets this Light's current position and places it in the parameter specified.
-
setAttenuation(float, float, float)
- Sets this Light's current attenuation values and places it in the parameter specified.
-
setAttenuation(Point3f)
- Sets this Light's current attenuation values and places it in the parameter specified.
-
setPosition(float, float, float)
- Set light position.
-
setPosition(Point3f)
- Set light position.
ALLOW_POSITION_READ
public static final int ALLOW_POSITION_READ
- Specifies that this PointLight node allows reading its position
information.
ALLOW_POSITION_WRITE
public static final int ALLOW_POSITION_WRITE
- Specifies that this PointLight node allows writing its position
information.
ALLOW_ATTENUATION_READ
public static final int ALLOW_ATTENUATION_READ
- Specifies that this PointLight node allows reading its attenuation
information.
ALLOW_ATTENUATION_WRITE
public static final int ALLOW_ATTENUATION_WRITE
- Specifies that this PointLight node allows writing its attenuation
information.
PointLight
public PointLight()
- Constructs and initializes a point light source.
The default position is at (0,0,0).
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
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
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
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
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
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
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
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