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.
-
ALLOW_DIRECTION_READ
- Specifies that the Node allows access to its object's direction
information.
-
ALLOW_DIRECTION_WRITE
- Specifies that the Node allows writing to its object's direction
information.
-
DirectionalLight()
- Constructs and initializes a directional light.
-
DirectionalLight(boolean, Color3f, Vector3f)
- Constructs and initializes a directional light.
-
DirectionalLight(Color3f, Vector3f)
- Constructs and initializes a directional light.
-
getDirection(Vector3f)
- Gets this Light's current direction and places it in the parameter specified.
-
setDirection(float, float, float)
- Set light direction.
-
setDirection(Vector3f)
- Set light direction.
ALLOW_DIRECTION_READ
public static final int ALLOW_DIRECTION_READ
- Specifies that the Node allows access to its object's direction
information.
ALLOW_DIRECTION_WRITE
public static final int ALLOW_DIRECTION_WRITE
- Specifies that the Node allows writing to its object's direction
information.
DirectionalLight
public DirectionalLight()
- Constructs and initializes a directional light.
The default direction is toward the screen, along the negitive z axis.
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
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
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
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
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