Interface TimeSensor

All Superinterfaces:
X3DChildNode, X3DNode, X3DSensorNode, X3DTimeDependentNode
All Known Implementing Classes:
TimeSensor

public interface TimeSensor extends X3DTimeDependentNode, X3DSensorNode
TimeSensor continuously generates events as time passes.

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: [X3DTimeDependentNode,X3DSensorNode] TimeSensor continuously generates events as time passes. Typical use: ROUTE thisTimeSensorDEF.fraction_changed TO someInterpolatorDEF.set_fraction. Interchange profile hint: TimeSensor may be ignored if cycleInterval &lt; 0.01 second. Hint: event timing details are explained in X3D Specification 4.4.8.3 Execution model <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.proof//Part01/concepts.html#ExecutionModel" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.proof//Part01/concepts.html#ExecutionModel</a> Hint: X3D Architecture 8 Time component <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.proof//Part01/components/time.html" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.proof//Part01/components/time.html</a> Hint: example scenes and authoring assets at <a href="https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter07EventAnimationInterpolation" target="_blank">https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter07EventAnimationInterpolation</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
    double
    Provide double value in seconds within allowed range of [0,infinity) from inputOutput SFTime field named cycleInterval.
    double
    Provide double value in seconds within allowed range of [0,infinity) from outputOnly SFTime field named cycleTime.
    Provide String value from inputOutput SFString field named description.
    double
    Provide double value in seconds within allowed range of [0,infinity) from outputOnly SFTime field named elapsedTime.
    boolean
    Provide boolean value from inputOutput SFBool field named enabled.
    float
    Provide float value from outputOnly SFFloat field named fraction_changed.
    boolean
    Provide boolean value from outputOnly SFBool field named isActive.
    boolean
    Provide boolean value from outputOnly SFBool field named isPaused.
    boolean
    Provide boolean value from inputOutput SFBool field named loop.
    Provide org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.
    double
    Provide double value in seconds from inputOutput SFTime field named pauseTime.
    double
    Provide double value in seconds from inputOutput SFTime field named resumeTime.
    double
    Provide double value in seconds from inputOutput SFTime field named startTime.
    double
    Provide double value in seconds from inputOutput SFTime field named stopTime.
    double
    Provide double value in seconds within allowed range of [0,infinity) from outputOnly SFTime field named time.
    setCycleInterval(double newValue)
    Accessor method to assign double value in seconds to inputOutput SFTime field named cycleInterval.
    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.
    setLoop(boolean newValue)
    Accessor method to assign boolean value to inputOutput SFBool field named loop.
    Accessor method to assign org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
    setPauseTime(double newValue)
    Accessor method to assign double value in seconds to inputOutput SFTime field named pauseTime.
    setResumeTime(double newValue)
    Accessor method to assign double value in seconds to inputOutput SFTime field named resumeTime.
    setStartTime(double newValue)
    Accessor method to assign double value in seconds to inputOutput SFTime field named startTime.
    setStopTime(double newValue)
    Accessor method to assign double value in seconds to inputOutput SFTime field named stopTime.
  • Method Details

    • getCycleInterval

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

      Tooltip: [0,+infinity) cycleInterval is loop duration in seconds. Interchange profile hint: TimeSensor may be ignored if cycleInterval &lt; 0.01 second. Warning: An active TimeSensor node ignores set_cycleInterval and set_startTime events. Hint: cycleInterval is a nonnegative SFTime duration interval, not an absolute clock time. *
      Returns:
      value of cycleInterval field
    • setCycleInterval

      TimeSensor setCycleInterval(double newValue)
      Accessor method to assign double value in seconds to inputOutput SFTime field named cycleInterval.

      Tooltip: [0,+infinity) cycleInterval is loop duration in seconds. Interchange profile hint: TimeSensor may be ignored if cycleInterval &lt; 0.01 second. Warning: An active TimeSensor node ignores set_cycleInterval and set_startTime events. Hint: cycleInterval is a nonnegative SFTime duration interval, not an absolute clock time. *
      Parameters:
      newValue - is new value for the cycleInterval field.
      Returns:
      TimeSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • getCycleTime

      double getCycleTime()
      Provide double value in seconds within allowed range of [0,infinity) from outputOnly SFTime field named cycleTime.

      Tooltip: cycleTime sends a time outputOnly at startTime, and also at the beginning of each new cycle (useful for synchronization with other time-based objects). Hint: the first cycleTime event for a TimeSensor node can be used as an alarm (single pulse at a specified time). Hint: cycleTime is a nonnegative SFTime duration interval, not an absolute clock time. 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 cycleTime field
    • getDescription

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

      Tooltip: Author-provided prose that describes intended purpose of this 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 X3DSensorNode
      Specified by:
      getDescription in interface X3DTimeDependentNode
      Returns:
      value of description field
    • setDescription

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

      Tooltip: Author-provided prose that describes intended purpose of this 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 X3DSensorNode
      Specified by:
      setDescription in interface X3DTimeDependentNode
      Parameters:
      newValue - is new value for the description field.
      Returns:
      TimeSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • getElapsedTime

      double getElapsedTime()
      Provide double value in seconds within allowed range of [0,infinity) from outputOnly SFTime field named elapsedTime.

      Tooltip: [0,+infinity) Current elapsed time since TimeSensor activated/running, cumulative in seconds, and not counting any paused time. Warning: not supported in VRML97. Warning: it is an error to define this transient outputOnly field in an X3D file, instead only use it a source for ROUTE events. Hint: elapsedTime is a nonnegative SFTime duration interval, not an absolute clock time. *
      Specified by:
      getElapsedTime in interface X3DTimeDependentNode
      Returns:
      value of elapsedTime field
    • getEnabled

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

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

      TimeSensor 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 X3DSensorNode
      Parameters:
      newValue - is new value for the enabled field.
      Returns:
      TimeSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • getFraction

      float getFraction()
      Provide float value from outputOnly SFFloat field named fraction_changed.

      Tooltip: fraction_changed continuously sends value in range [0,1] showing time progress in the current cycle. 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 fraction_changed field
    • getIsActive

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

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

      boolean getIsPaused()
      Provide boolean value from outputOnly SFBool field named isPaused.

      Tooltip: isPaused true/false events are sent when TimeSensor is paused/resumed. Warning: not supported in VRML97. 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:
      getIsPaused in interface X3DTimeDependentNode
      Returns:
      value of isPaused field
    • getLoop

      boolean getLoop()
      Provide boolean value from inputOutput SFBool field named loop.

      Tooltip: Repeat indefinitely when loop=true, repeat only once when loop=false. *
      Returns:
      value of loop field
    • setLoop

      TimeSensor setLoop(boolean newValue)
      Accessor method to assign boolean value to inputOutput SFBool field named loop.

      Tooltip: Repeat indefinitely when loop=true, repeat only once when loop=false. *
      Parameters:
      newValue - is new value for the loop field.
      Returns:
      TimeSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • 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 X3DNode
      Specified by:
      getMetadata in interface X3DSensorNode
      Specified by:
      getMetadata in interface X3DTimeDependentNode
      Returns:
      value of metadata field
      See Also:
    • setMetadata

      TimeSensor 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 X3DNode
      Specified by:
      setMetadata in interface X3DSensorNode
      Specified by:
      setMetadata in interface X3DTimeDependentNode
      Parameters:
      newValue - is new value for the metadata field.
      Returns:
      TimeSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
      See Also:
    • getPauseTime

      double getPauseTime()
      Provide double value in seconds from inputOutput SFTime field named pauseTime.

      Tooltip: When time now &gt;= pauseTime, isPaused becomes true and TimeSensor becomes paused. Absolute time: number of seconds since January 1, 1970, 00:00:00 GMT. Hint: ROUTE a time value matching system clock to this field, such as output event from TouchSensor touchTime or TimeTrigger triggerTime. Warning: not supported in VRML97. *
      Specified by:
      getPauseTime in interface X3DTimeDependentNode
      Returns:
      value of pauseTime field
    • setPauseTime

      TimeSensor setPauseTime(double newValue)
      Accessor method to assign double value in seconds to inputOutput SFTime field named pauseTime.

      Tooltip: When time now &gt;= pauseTime, isPaused becomes true and TimeSensor becomes paused. Absolute time: number of seconds since January 1, 1970, 00:00:00 GMT. Hint: ROUTE a time value matching system clock to this field, such as output event from TouchSensor touchTime or TimeTrigger triggerTime. Warning: not supported in VRML97. *
      Specified by:
      setPauseTime in interface X3DTimeDependentNode
      Parameters:
      newValue - is new value for the pauseTime field.
      Returns:
      TimeSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • getResumeTime

      double getResumeTime()
      Provide double value in seconds from inputOutput SFTime field named resumeTime.

      Tooltip: When resumeTime becomes &lt;= time now, isPaused becomes false and TimeSensor becomes inactive. Absolute time: number of seconds since January 1, 1970, 00:00:00 GMT. Hint: ROUTE a time value matching system clock to this field, such as output event from TouchSensor touchTime or TimeTrigger triggerTime. Warning: not supported in VRML97. *
      Specified by:
      getResumeTime in interface X3DTimeDependentNode
      Returns:
      value of resumeTime field
    • setResumeTime

      TimeSensor setResumeTime(double newValue)
      Accessor method to assign double value in seconds to inputOutput SFTime field named resumeTime.

      Tooltip: When resumeTime becomes &lt;= time now, isPaused becomes false and TimeSensor becomes inactive. Absolute time: number of seconds since January 1, 1970, 00:00:00 GMT. Hint: ROUTE a time value matching system clock to this field, such as output event from TouchSensor touchTime or TimeTrigger triggerTime. Warning: not supported in VRML97. *
      Specified by:
      setResumeTime in interface X3DTimeDependentNode
      Parameters:
      newValue - is new value for the resumeTime field.
      Returns:
      TimeSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • getStartTime

      double getStartTime()
      Provide double value in seconds from inputOutput SFTime field named startTime.

      Tooltip: When time now &gt;= startTime, isActive becomes true and TimeSensor becomes active. Absolute time: number of seconds since January 1, 1970, 00:00:00 GMT. Hint: ROUTE a time value matching system clock to this field, such as output event from TouchSensor touchTime or TimeTrigger triggerTime. *
      Specified by:
      getStartTime in interface X3DTimeDependentNode
      Returns:
      value of startTime field
    • setStartTime

      TimeSensor setStartTime(double newValue)
      Accessor method to assign double value in seconds to inputOutput SFTime field named startTime.

      Tooltip: When time now &gt;= startTime, isActive becomes true and TimeSensor becomes active. Absolute time: number of seconds since January 1, 1970, 00:00:00 GMT. Hint: ROUTE a time value matching system clock to this field, such as output event from TouchSensor touchTime or TimeTrigger triggerTime. *
      Specified by:
      setStartTime in interface X3DTimeDependentNode
      Parameters:
      newValue - is new value for the startTime field.
      Returns:
      TimeSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • getStopTime

      double getStopTime()
      Provide double value in seconds from inputOutput SFTime field named stopTime.

      Tooltip: When stopTime becomes &lt;= time now, isActive becomes false and TimeSensor becomes inactive. Absolute time: number of seconds since January 1, 1970, 00:00:00 GMT. Hint: ROUTE a time value matching system clock to this field, such as output event from TouchSensor touchTime or TimeTrigger triggerTime. Warning: An active TimeSensor node ignores set_cycleInterval and set_startTime events. Warning:An active TimeSensor node ignores set_stopTime event values less than or equal to startTime. *
      Specified by:
      getStopTime in interface X3DTimeDependentNode
      Returns:
      value of stopTime field
    • setStopTime

      TimeSensor setStopTime(double newValue)
      Accessor method to assign double value in seconds to inputOutput SFTime field named stopTime.

      Tooltip: When stopTime becomes &lt;= time now, isActive becomes false and TimeSensor becomes inactive. Absolute time: number of seconds since January 1, 1970, 00:00:00 GMT. Hint: ROUTE a time value matching system clock to this field, such as output event from TouchSensor touchTime or TimeTrigger triggerTime. Warning: An active TimeSensor node ignores set_cycleInterval and set_startTime events. Warning:An active TimeSensor node ignores set_stopTime event values less than or equal to startTime. *
      Specified by:
      setStopTime in interface X3DTimeDependentNode
      Parameters:
      newValue - is new value for the stopTime field.
      Returns:
      TimeSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • getTime

      double getTime()
      Provide double value in seconds within allowed range of [0,infinity) from outputOnly SFTime field named time.

      Tooltip: [0,+infinity) Time continuously sends the absolute time (value 0.0 matches 1 January 1970) in seconds for a given simulation tick. 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 time field