Class DirectionalLight

All Implemented Interfaces:
X3DChildNode, X3DNode, DirectionalLight, X3DLightNode

public class DirectionalLight extends X3DConcreteNode implements DirectionalLight
DirectionalLight might not be scoped by parent Group or Transform at levels 1 or 2.

Warning: this is an abstract interface that cannot be instantiated as a concrete object. Java programmers typically only need to use concrete objects provided by the org.web3d.x3d.jsail classes. DirectionalLight node tooltip: [X3DLightNode] DirectionalLight defines parallel light rays that illuminate geometric shapes. Lighting illuminates all geometry except lines and points. By default, light scope only illuminates peer geometry and children nodes within the scene graph hierarchy. No source location is needed since rays are parallel from an infinitely distant source. DirectionalLight nodes do not attenuate with distance. Lights have no visible shape themselves and lighting effects continue through any intermediate geometry.
  • Hint: animate direction to simulate time-of-day sunlight effects.
  • Hint: the bound NavigationInfo controls whether headlight is enabled on/off. Interchange profile
  • Hint: light might not be scoped by parent Group or Transform.

Note that SFColor provides a variety of color constants.

Package hint: This org.web3d.x3d.jsail concrete class is used for implementing a standalone X3D object as a Plain Old Java Object (POJO). If you are writing Java code for use inside an X3D Script node, compile separate code using only the org.web3d.x3d.sai package instead.
See Also:
  • Field Details

    • NAME

      public static final String NAME
      String constant NAME provides name of this element: DirectionalLight.
      See Also:
    • COMPONENT

      public static final String COMPONENT
      String constant COMPONENT defines X3D component for the DirectionalLight element: Lighting
      See Also:
    • LEVEL

      public static final int LEVEL
      Integer constant LEVEL provides default X3D Lighting component level for this element: 1
      See Also:
    • AMBIENTINTENSITY_DEFAULT_VALUE

      public static final float AMBIENTINTENSITY_DEFAULT_VALUE
      SFFloat field named ambientIntensity has default value 0f (Java syntax) or 0 (XML syntax).
      See Also:
    • COLOR_DEFAULT_VALUE

      public static final float[] COLOR_DEFAULT_VALUE
      SFColor field named color has default value {1f,1f,1f} (Java syntax) or 1 1 1 (XML syntax).
    • DIRECTION_DEFAULT_VALUE

      public static final float[] DIRECTION_DEFAULT_VALUE
      SFVec3f field named direction has default value {0f,0f,-1f} (Java syntax) or 0 0 -1 (XML syntax).
    • GLOBAL_DEFAULT_VALUE

      public static final boolean GLOBAL_DEFAULT_VALUE
      SFBool field named global has default value false (Java syntax) or false (XML syntax).
      See Also:
    • INTENSITY_DEFAULT_VALUE

      public static final float INTENSITY_DEFAULT_VALUE
      SFFloat field named intensity has default value 1f (Java syntax) or 1 (XML syntax).
      See Also:
    • IS_DEFAULT_VALUE

      public static final IS IS_DEFAULT_VALUE
      SFNode field named IS has default value null (Java syntax) or NULL (XML syntax).
    • METADATA_DEFAULT_VALUE

      public static final X3DMetadataObject METADATA_DEFAULT_VALUE
      SFNode field named metadata has default value null (Java syntax) or NULL (XML syntax).
    • ON_DEFAULT_VALUE

      public static final boolean ON_DEFAULT_VALUE
      SFBool field named on has default value true (Java syntax) or true (XML syntax).
      See Also:
    • SHADOWINTENSITY_DEFAULT_VALUE

      public static final float SHADOWINTENSITY_DEFAULT_VALUE
      SFFloat field named shadowIntensity has default value 1f (Java syntax) or 1 (XML syntax).
      See Also:
    • SHADOWS_DEFAULT_VALUE

      public static final boolean SHADOWS_DEFAULT_VALUE
      SFBool field named shadows has default value false (Java syntax) or false (XML syntax).
      See Also:
    • containerField_DEFAULT_VALUE

      public static final String containerField_DEFAULT_VALUE
      containerField describes typical field relationship of a node to its parent. Usage is not ordinarily needed when using this API, this default value is provided for informational purposes only.
      containerField_DEFAULT_VALUE = "children";
      containerField_ALLOWED_VALUES = {"children" }; type xs:NMTOKEN
      See Also:
    • fromField_AMBIENTINTENSITY

      public static final String fromField_AMBIENTINTENSITY
      fromField ROUTE name for SFFloat field named ambientIntensity.
      See Also:
    • toField_AMBIENTINTENSITY

      public static final String toField_AMBIENTINTENSITY
      toField ROUTE name for SFFloat field named ambientIntensity.
      See Also:
    • fromField_COLOR

      public static final String fromField_COLOR
      fromField ROUTE name for SFColor field named color.
      See Also:
    • toField_COLOR

      public static final String toField_COLOR
      toField ROUTE name for SFColor field named color.
      See Also:
    • fromField_DIRECTION

      public static final String fromField_DIRECTION
      fromField ROUTE name for SFVec3f field named direction.
      See Also:
    • toField_DIRECTION

      public static final String toField_DIRECTION
      toField ROUTE name for SFVec3f field named direction.
      See Also:
    • fromField_GLOBAL

      public static final String fromField_GLOBAL
      fromField ROUTE name for SFBool field named global.
      See Also:
    • toField_GLOBAL

      public static final String toField_GLOBAL
      toField ROUTE name for SFBool field named global.
      See Also:
    • fromField_INTENSITY

      public static final String fromField_INTENSITY
      fromField ROUTE name for SFFloat field named intensity.
      See Also:
    • toField_INTENSITY

      public static final String toField_INTENSITY
      toField ROUTE name for SFFloat field named intensity.
      See Also:
    • fromField_IS

      public static final String fromField_IS
      fromField ROUTE name for SFNode field named IS.
      See Also:
    • fromField_METADATA

      public static final String fromField_METADATA
      fromField ROUTE name for SFNode field named metadata.
      See Also:
    • toField_METADATA

      public static final String toField_METADATA
      toField ROUTE name for SFNode field named metadata.
      See Also:
    • fromField_ON

      public static final String fromField_ON
      fromField ROUTE name for SFBool field named on.
      See Also:
    • toField_ON

      public static final String toField_ON
      toField ROUTE name for SFBool field named on.
      See Also:
    • fromField_SHADOWINTENSITY

      public static final String fromField_SHADOWINTENSITY
      fromField ROUTE name for SFFloat field named shadowIntensity.
      See Also:
    • toField_SHADOWINTENSITY

      public static final String toField_SHADOWINTENSITY
      toField ROUTE name for SFFloat field named shadowIntensity.
      See Also:
    • fromField_SHADOWS

      public static final String fromField_SHADOWS
      fromField ROUTE name for SFBool field named shadows.
      See Also:
    • toField_SHADOWS

      public static final String toField_SHADOWS
      toField ROUTE name for SFBool field named shadows.
      See Also:
  • Constructor Details

    • DirectionalLight

      public DirectionalLight()
      Constructor for DirectionalLight to initialize member variables with default values.
    • DirectionalLight

      public DirectionalLight(String DEFlabel)
      Utility constructor that assigns DEF label after initializing member variables with default values.
      Parameters:
      DEFlabel - unique DEF name for this X3D node
  • Method Details