Interface Fog

All Superinterfaces:
X3DBindableNode, X3DChildNode, X3DFogObject, X3DNode
All Known Implementing Classes:
Fog

public interface Fog extends X3DBindableNode, X3DFogObject
Fog simulates atmospheric effects by blending distant objects with fog color.

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. Fog node tooltip: [X3DBindableNode,X3DFogObject] Fog simulates atmospheric effects by blending distant objects with fog color.
  • Hint: Background, Fog, GeoViewpoint, NavigationInfo, OrthoViewpoint, TextureBackground and Viewpoint are bindable nodes, meaning that no more than one of each node type can be active at a given time.
  • Warning: results are undefined if a bindable node (Background, Fog, NavigationInfo, OrthoViewpoint, TextureBackground, Viewpoint) is a contained descendant node of either LOD or Switch. Avoid this authoring pattern.

Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Provide double value in seconds from outputOnly SFTime field named bindTime.
    float[]
    Provide array of 3-tuple float results using RGB values [0..1] using RGB values [0..1] from inputOutput SFColor field named color.
    Provide String enumeration value (baseType xs:NMTOKEN) ["LINEAR" | "EXPONENTIAL"] from inputOutput SFString field named fogType.
    boolean
    Provide boolean value from outputOnly SFBool field named isBound.
    Provide org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.
    float
    Provide float value within allowed range of [0,infinity) from inputOutput SFFloat field named visibilityRange.
    setColor(float[] newValue)
    Accessor method to assign 3-tuple float array using RGB values [0..1] to inputOutput SFColor field named color.
    setFogType(String newValue)
    Accessor method to assign String enumeration value ("LINEAR" | "EXPONENTIAL") to inputOutput SFString field named fogType.
    Accessor method to assign org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
    setVisibilityRange(float newValue)
    Accessor method to assign float value to inputOutput SFFloat field named visibilityRange.
  • Method Details

    • getBindTime

      double getBindTime()
      Provide double value in seconds from outputOnly SFTime field named bindTime.

      Tooltip: Event sent reporting timestamp when node becomes active/inactive.
      • Warning: it is an error to define this transient outputOnly field in an X3D file, instead only use it a source for ROUTE events.
      Specified by:
      getBindTime in interface X3DBindableNode
      Returns:
      value of bindTime field
    • getColor

      float[] getColor()
      Provide array of 3-tuple float results using RGB values [0..1] using RGB values [0..1] from inputOutput SFColor field named color.

      Tooltip: [0,1] Fog color.
      Specified by:
      getColor in interface X3DFogObject
      Returns:
      value of color field
    • setColor

      Fog setColor(float[] newValue)
      Accessor method to assign 3-tuple float array using RGB values [0..1] to inputOutput SFColor field named color.

      Tooltip: [0,1] Fog color.
      Specified by:
      setColor in interface X3DFogObject
      Parameters:
      newValue - is new value for the color field.
      Returns:
      Fog - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • getFogType

      String getFogType()
      Provide String enumeration value (baseType xs:NMTOKEN) ["LINEAR" | "EXPONENTIAL"] from inputOutput SFString field named fogType.

      Tooltip: Specifies algorithm for rate of increasing Fog, either LINEAR or EXPONENTIAL.
      • Hint: EXPONENTIAL is more natural but also more computationally expensive.
      • Warning: do not wrap extra quotation marks around these SFString enumeration values, since "quotation" "marks" are only used for MFString values.
      Specified by:
      getFogType in interface X3DFogObject
      Returns:
      value of fogType field
    • setFogType

      Fog setFogType(String newValue)
      Accessor method to assign String enumeration value ("LINEAR" | "EXPONENTIAL") to inputOutput SFString field named fogType.

      Tooltip: Specifies algorithm for rate of increasing Fog, either LINEAR or EXPONENTIAL.
      • Hint: EXPONENTIAL is more natural but also more computationally expensive.
      • Warning: do not wrap extra quotation marks around these SFString enumeration values, since "quotation" "marks" are only used for MFString values.
      Specified by:
      setFogType in interface X3DFogObject
      Parameters:
      newValue - is new value for the fogType field.
      Returns:
      Fog - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • getIsBound

      boolean getIsBound()
      Provide boolean value from outputOnly SFBool field named isBound.

      Tooltip: Output event true gets sent when node becomes bound and activated, otherwise output event false gets sent when node becomes unbound and deactivated.
      • Hint: paired node operations can be established by connecting set_bind and isBound fields of corresponding bindable nodes.
      • Warning: it is an error to define this transient outputOnly field in an X3D file, instead only use it a source for ROUTE events.
      Specified by:
      getIsBound in interface X3DBindableNode
      Returns:
      value of isBound field
    • getMetadata

      X3DMetadataObject getMetadata()
      Provide org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.

      Tooltip: [X3DMetadataObject] Information about this node can be contained in a MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataString or MetadataSet node.
      Specified by:
      getMetadata in interface X3DBindableNode
      Specified by:
      getMetadata in interface X3DChildNode
      Specified by:
      getMetadata in interface X3DNode
      Returns:
      value of metadata field
      See Also:
    • setMetadata

      Fog setMetadata(X3DMetadataObject newValue)
      Accessor method to assign org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.

      Tooltip: [X3DMetadataObject] Information about this node can be contained in a MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataString or MetadataSet node.
      Specified by:
      setMetadata in interface X3DBindableNode
      Specified by:
      setMetadata in interface X3DChildNode
      Specified by:
      setMetadata in interface X3DNode
      Parameters:
      newValue - is new value for the metadata field.
      Returns:
      Fog - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
      See Also:
    • getVisibilityRange

      float getVisibilityRange()
      Provide float value within allowed range of [0,infinity) from inputOutput SFFloat field named visibilityRange.

      Tooltip: Distance in meters where objects are totally obscured by the fog, using local coordinate system.
      • Hint: visibilityRange 0 disables Fog.
      Specified by:
      getVisibilityRange in interface X3DFogObject
      Returns:
      value of visibilityRange field
    • setVisibilityRange

      Fog setVisibilityRange(float newValue)
      Accessor method to assign float value to inputOutput SFFloat field named visibilityRange.

      Tooltip: Distance in meters where objects are totally obscured by the fog, using local coordinate system.
      • Hint: visibilityRange 0 disables Fog.
      Specified by:
      setVisibilityRange in interface X3DFogObject
      Parameters:
      newValue - is new value for the visibilityRange field.
      Returns:
      Fog - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).