Interface TimeSensor

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

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

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 < 0.01 second.
Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
See Also:
SAI Java Specification: TODO, X3D Abstract Specification: TimeSensor, X3D Tooltips: TimeSensor, X3D Scene Authoring Hints
  • Method Summary

    Modifier and Type Method Description
    double getCycleInterval()
    Provide double value in seconds within allowed range of [0,infinity) from inputOutput SFTime field named cycleInterval.
    double getCycleTime()
    Provide double value in seconds within allowed range of [0,infinity) from outputOnly SFTime field named cycleTime.
    double getElapsedTime()
    Provide double value in seconds within allowed range of [0,infinity) from outputOnly SFTime field named elapsedTime.
    boolean getEnabled()
    Provide boolean value from inputOutput SFBool field named enabled.
    float getFraction()
    Provide float value from outputOnly SFFloat field named fraction_changed.
    boolean getIsActive()
    Provide boolean value from outputOnly SFBool field named isActive.
    boolean getIsPaused()
    Provide boolean value from outputOnly SFBool field named isPaused.
    boolean getLoop()
    Provide boolean value from inputOutput SFBool field named loop.
    X3DMetadataObject getMetadata()
    Provide X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.
    double getPauseTime()
    Provide double value in seconds from inputOutput SFTime field named pauseTime.
    double getResumeTime()
    Provide double value in seconds from inputOutput SFTime field named resumeTime.
    double getStartTime()
    Provide double value in seconds from inputOutput SFTime field named startTime.
    double getStopTime()
    Provide double value in seconds from inputOutput SFTime field named stopTime.
    double getTime()
    Provide double value in seconds within allowed range of [0,infinity) from outputOnly SFTime field named time.
    TimeSensor setCycleInterval​(double newValue)
    Accessor method to assign double value in seconds to inputOutput SFTime field named cycleInterval.
    TimeSensor setEnabled​(boolean newValue)
    Accessor method to assign boolean value to inputOutput SFBool field named enabled.
    TimeSensor setLoop​(boolean newValue)
    Accessor method to assign boolean value to inputOutput SFBool field named loop.
    TimeSensor setMetadata​(X3DMetadataObject newValue)
    Accessor method to assign X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
    TimeSensor setPauseTime​(double newValue)
    Accessor method to assign double value in seconds to inputOutput SFTime field named pauseTime.
    TimeSensor setResumeTime​(double newValue)
    Accessor method to assign double value in seconds to inputOutput SFTime field named resumeTime.
    TimeSensor setStartTime​(double newValue)
    Accessor method to assign double value in seconds to inputOutput SFTime field named startTime.
    TimeSensor 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 < 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 < 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
    • 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. *
      Specified by:
      getLoop in interface X3DTimeDependentNode
      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. *
      Specified by:
      setLoop in interface X3DTimeDependentNode
      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 X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.
      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:
      X3D Scene Authoring Hints: Metadata Nodes
    • setMetadata

      TimeSensor setMetadata​(X3DMetadataObject newValue)
      Accessor method to assign X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
      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:
      X3D Scene Authoring Hints: Metadata Nodes
    • getPauseTime

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

      Tooltip: When time now >= 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 >= 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 <= 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 <= 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 >= 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 >= 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 <= 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 <= 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