Class dnx.lr.node.DirectionalLightNode
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class dnx.lr.node.DirectionalLightNode

java.lang.Object
   |
   +----dnx.util.DNXObject
           |
           +----dnx.lr.Node
                   |
                   +----dnx.lr.LeafNode
                           |
                           +----dnx.lr.node.DirectionalLightNode

public class DirectionalLightNode
extends LeafNode
implements SubtreePropertyNode
 DirectionalLight {
    exposedField SFFloat      ambientIntensity 0
    exposedField SFColor      color           1 1 1
    exposedField SFVec3f      direction       0 0 -1
    exposedField SFFloat      intensity       1
    exposedField SFBool       on              TRUE
 }

The DirectionalLight node defines a directional light source that illuminates along rays parallel to a given 3-dimensional vector. See "Concepts - Lights" for a definition of the ambientIntensity, color, intensity, and on fields.

The direction field specifies the direction vector within the local coordinate system that the light illuminates in. Light is emitted along parallel rays from an infinite distance away. A directional light source illuminates only the objects in its enclosing parent group. The light may illuminate everything within this coordinate system, including all children and descendants of its parent group. The accumulated transformations of the parent nodes affect the light.

See "Concepts - Lighting Model"for a precise description of VRML's lighting equations.

Some low-end renderers do not support the concept of per-object lighting. This means that placing DirectionalLights inside local coordinate systems, which implies lighting only the objects beneath the Transform with that light, is not supported in all systems. For the broadest compatibility, lights should be placed at outermost scope.


Variable Index

 o ambientIntensity
 o color
 o direction
 o intensity
 o on

Constructor Index

 o DirectionalLightNode()

Method Index

 o createNodeDefinition(NodeDefinition)
Create the node definition.
 o getSubtreeProperty()
 o handleFieldChange(Field)
Handle a field change.
 o initFields()
Initialize field values.

Variables

 o ambientIntensity
  public SFFloat ambientIntensity
 o color
  public SFColor color
 o direction
  public SFVec3f direction
 o intensity
  public SFFloat intensity
 o on
  public SFBool on

Constructors

 o DirectionalLightNode
  public DirectionalLightNode()

Methods

 o createNodeDefinition
  protected void createNodeDefinition(NodeDefinition def)
Create the node definition.
Overrides:
createNodeDefinition in class Node
 o initFields
  protected void initFields()
Initialize field values.
Overrides:
initFields in class Node
 o getSubtreeProperty
  public Object getSubtreeProperty()
 o handleFieldChange
  protected void handleFieldChange(Field f)
Handle a field change.
Overrides:
handleFieldChange in class Node

All Packages  Class Hierarchy  This Package  Previous  Next  Index