Interface LoadSensor

All Superinterfaces:
X3DChildNode, X3DNetworkSensorNode, X3DNode, X3DSensorNode
All Known Implementing Classes:
LoadSensor

public interface LoadSensor extends X3DNetworkSensorNode
LoadSensor generates events as watchList child nodes are either loaded or fail to load.

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. X3D node tooltip: [X3DNetworkSensorNode] LoadSensor generates events as watchList child nodes are either loaded or fail to load. Changing watchlist child nodes restarts the LoadSensor. Hint: use multiple LoadSensor nodes to track multiple loading nodes individually. Hint: Background node is not sensed by LoadSensor due to node typing and multiple-image ambiguity, alternatively utilize TextureBackground node with multiple ImageTexture nodes each referenced inside LoadSensor. Warning: children (watchList) child nodes are not rendered, so normally USE copies of other nodes to sense load status. Hint: use Inline 'load' field to prompt or defer loading. Warning: new X3D node, not supported in VRML97. Hint: example scenes and authoring assets at <a href="https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter12EnvironmentSensorSound" target="_blank">https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter12EnvironmentSensorSound</a> Warning: 'children' field originally named 'watchList' in X3Dv3. <a href="https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#fieldNameChanges" target="_blank">https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#fieldNameChanges</a> *


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
    void
    addChildren(X3DNode[] newValue)
    Add array of children nodes to array of existing nodes (if any).
    Provide array of org.web3d.x3d.sai.Core.X3DNode results (using an array consisting of properly typed nodes or ProtoInstances) from inputOutput MFNode field children.
    Provide String value from inputOutput SFString field named description.
    boolean
    Provide boolean value from inputOutput SFBool field named enabled.
    boolean
    Provide boolean value from outputOnly SFBool field named isActive.
    boolean
    Provide boolean value from outputOnly SFBool field named isLoaded.
    double
    Provide double value in seconds from outputOnly SFTime field named loadTime.
    Provide org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.
    float
    Provide float value from outputOnly SFFloat field named progress.
    double
    Provide double value in seconds within allowed range of [0,infinity) from inputOutput SFTime field named timeOut.
    void
    setChildren(X3DNode newValue)
    Set single children node, replacing prior array of existing nodes (if any).
    setChildren(X3DNode[] newValue)
    Accessor method to assign org.web3d.x3d.sai.Core.X3DNode array (using an array consisting of properly typed nodes or ProtoInstances) to inputOutput MFNode field children.
    Accessor method to assign String value to inputOutput SFString field named description.
    setEnabled(boolean newValue)
    Accessor method to assign boolean value to inputOutput SFBool field named enabled.
    Accessor method to assign org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
    setTimeOut(double newValue)
    Accessor method to assign double value in seconds to inputOutput SFTime field named timeOut.
  • Method Details

    • getChildren

      X3DNode[] getChildren()
      Provide array of org.web3d.x3d.sai.Core.X3DNode results (using an array consisting of properly typed nodes or ProtoInstances) from inputOutput MFNode field children.

      Tooltip: [X3DUrlObject] The children field monitors one or more USE nodes that contain a valid url field. Warning: field originally named 'watchList' in X3Dv3. <a href="https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#fieldNameChanges" target="_blank">https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#fieldNameChanges</a> Hint: if watchList contains multiple USE nodes, output events are only generated when all children have loaded successfully or at least one node has failed. Hint: if individual load status information is desired for different nodes, multiple LoadSensor nodes may be used, each with a single watchList element. Hint: Anchor nodes can be monitored for binding a target Viewpoint, loading a new scene, or loading a new scene in a new window. *


      Warning: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DUrlObject.
      Returns:
      value of children field
      See Also:
    • setChildren

      LoadSensor setChildren(X3DNode[] newValue)
      Accessor method to assign org.web3d.x3d.sai.Core.X3DNode array (using an array consisting of properly typed nodes or ProtoInstances) to inputOutput MFNode field children.

      Tooltip: [X3DUrlObject] The children field monitors one or more USE nodes that contain a valid url field. Warning: field originally named 'watchList' in X3Dv3. <a href="https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#fieldNameChanges" target="_blank">https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#fieldNameChanges</a> Hint: if watchList contains multiple USE nodes, output events are only generated when all children have loaded successfully or at least one node has failed. Hint: if individual load status information is desired for different nodes, multiple LoadSensor nodes may be used, each with a single watchList element. Hint: Anchor nodes can be monitored for binding a target Viewpoint, loading a new scene, or loading a new scene in a new window. *


      Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DUrlObject.
      Parameters:
      newValue - is new value for the children field.
      Returns:
      LoadSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • addChildren

      void addChildren(X3DNode[] newValue)
      Add array of children nodes to array of existing nodes (if any).

      Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DUrlObject.
      Parameters:
      newValue - is new value array to be appended the children field.
    • setChildren

      void setChildren(X3DNode newValue)
      Set single children node, replacing prior array of existing nodes (if any).
      Parameters:
      newValue - is new node for the children field
    • getDescription

      String getDescription()
      Provide String value from inputOutput SFString field named description.

      Tooltip: Author-provided prose that describes intended purpose of the node. Hint: many XML tools substitute XML character references for special characters automatically if needed within an attribute value (such as &#38; for & ampersand character, or &#34; for " quotation-mark character). *
      Specified by:
      getDescription in interface X3DNetworkSensorNode
      Specified by:
      getDescription in interface X3DSensorNode
      Returns:
      value of description field
    • setDescription

      LoadSensor setDescription(String newValue)
      Accessor method to assign String value to inputOutput SFString field named description.

      Tooltip: Author-provided prose that describes intended purpose of the node. Hint: many XML tools substitute XML character references for special characters automatically if needed within an attribute value (such as &#38; for & ampersand character, or &#34; for " quotation-mark character). *
      Specified by:
      setDescription in interface X3DNetworkSensorNode
      Specified by:
      setDescription in interface X3DSensorNode
      Parameters:
      newValue - is new value for the description field.
      Returns:
      LoadSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • getEnabled

      boolean getEnabled()
      Provide boolean value from inputOutput SFBool field named enabled.

      Tooltip: Enables/disables node operation. *
      Specified by:
      getEnabled in interface X3DNetworkSensorNode
      Specified by:
      getEnabled in interface X3DSensorNode
      Returns:
      value of enabled field
    • setEnabled

      LoadSensor setEnabled(boolean newValue)
      Accessor method to assign boolean value to inputOutput SFBool field named enabled.

      Tooltip: Enables/disables node operation. *
      Specified by:
      setEnabled in interface X3DNetworkSensorNode
      Specified by:
      setEnabled in interface X3DSensorNode
      Parameters:
      newValue - is new value for the enabled field.
      Returns:
      LoadSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • getIsActive

      boolean getIsActive()
      Provide boolean value from outputOnly SFBool field named isActive.

      Tooltip: isActive true/false events are sent when sensing starts/stops. 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:
      getIsActive in interface X3DNetworkSensorNode
      Specified by:
      getIsActive in interface X3DSensorNode
      Returns:
      value of isActive field
    • getIsLoaded

      boolean getIsLoaded()
      Provide boolean value from outputOnly SFBool field named isLoaded.

      Tooltip: Notify when all watchList child nodes are loaded, or at least one has failed. Sends true on successfully loading all watchList child nodes. Sends false on timeOut of any watchList child nodes, failure of any watchList child nodes to load, or no local copies available and no network present. Hint: use multiple LoadSensor nodes to track multiple loading nodes individually. Warning: it is an error to define this transient outputOnly field in an X3D file, instead only use it a source for ROUTE events. *
      Returns:
      value of isLoaded field
    • getLoadTime

      double getLoadTime()
      Provide double value in seconds from outputOnly SFTime field named loadTime.

      Tooltip: Time of successful load complete, not sent on failure. Warning: it is an error to define this transient outputOnly field in an X3D file, instead only use it a source for ROUTE events. *
      Returns:
      value of loadTime 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. Hint: X3D Architecture 7.2.4 Metadata <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.proof//Part01/components/core.html#Metadata" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.proof//Part01/components/core.html#Metadata</a> *
      Specified by:
      getMetadata in interface X3DChildNode
      Specified by:
      getMetadata in interface X3DNetworkSensorNode
      Specified by:
      getMetadata in interface X3DNode
      Specified by:
      getMetadata in interface X3DSensorNode
      Returns:
      value of metadata field
      See Also:
    • setMetadata

      LoadSensor 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. Hint: X3D Architecture 7.2.4 Metadata <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.proof//Part01/components/core.html#Metadata" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.proof//Part01/components/core.html#Metadata</a> *
      Specified by:
      setMetadata in interface X3DChildNode
      Specified by:
      setMetadata in interface X3DNetworkSensorNode
      Specified by:
      setMetadata in interface X3DNode
      Specified by:
      setMetadata in interface X3DSensorNode
      Parameters:
      newValue - is new value for the metadata field.
      Returns:
      LoadSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
      See Also:
    • getProgress

      float getProgress()
      Provide float value from outputOnly SFFloat field named progress.

      Tooltip: [0,1] Sends 0.0 on start and 1.0 on completion. Intermediate values are browser dependent and always increasing (may indicate fraction of bytes, fraction of expected time or another metric). Hint: only 0 and 1 events are guaranteed. Warning: it is an error to define this transient outputOnly field in an X3D file, instead only use it a source for ROUTE events. *
      Returns:
      value of progress field
    • getTimeOut

      double getTimeOut()
      Provide double value in seconds within allowed range of [0,infinity) from inputOutput SFTime field named timeOut.

      Tooltip: Time in seconds of maximum load duration prior to declaring failure. Default value zero means use browser defaults. *
      Returns:
      value of timeOut field
    • setTimeOut

      LoadSensor setTimeOut(double newValue)
      Accessor method to assign double value in seconds to inputOutput SFTime field named timeOut.

      Tooltip: Time in seconds of maximum load duration prior to declaring failure. Default value zero means use browser defaults. *
      Parameters:
      newValue - is new value for the timeOut field.
      Returns:
      LoadSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).