Interface TimeSensor
- All Superinterfaces:
X3DChildNode
,X3DNode
,X3DSensorNode
,X3DTimeDependentNode
- All Known Implementing Classes:
TimeSensor
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
Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
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.
TimeSensor 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.
- Hint: event timing details are explained in X3D Specification 4.4.8.3 Execution model https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/concepts.html#ExecutionModel
- Hint: X3D Architecture 8 Time component https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/time.html
- Hint: example scenes and authoring assets at https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter07EventAnimationInterpolation
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 TypeMethodDescriptiondouble
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
getLoop()
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
getTime()
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.setDescription
(String newValue) 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.setMetadata
(X3DMetadataObject newValue) 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 < 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
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
-
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 & for & ampersand character, or " for " quotation-mark character).
- Specified by:
getDescription
in interfaceX3DSensorNode
- Specified by:
getDescription
in interfaceX3DTimeDependentNode
- Returns:
- value of description field
-
setDescription
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 & for & ampersand character, or " for " quotation-mark character).
- Specified by:
setDescription
in interfaceX3DSensorNode
- Specified by:
setDescription
in interfaceX3DTimeDependentNode
- 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 interfaceX3DTimeDependentNode
- 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 interfaceX3DSensorNode
- Returns:
- value of enabled field
-
setEnabled
Accessor method to assign boolean value to inputOutput SFBool field named enabled.
Tooltip: Enables/disables node operation. *- Specified by:
setEnabled
in interfaceX3DSensorNode
- 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 interfaceX3DSensorNode
- Specified by:
getIsActive
in interfaceX3DTimeDependentNode
- 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 interfaceX3DTimeDependentNode
- 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
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 https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/core.html#Metadata
- Specified by:
getMetadata
in interfaceX3DChildNode
- Specified by:
getMetadata
in interfaceX3DNode
- Specified by:
getMetadata
in interfaceX3DSensorNode
- Specified by:
getMetadata
in interfaceX3DTimeDependentNode
- Returns:
- value of metadata field
- See Also:
-
setMetadata
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 https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/core.html#Metadata
- Specified by:
setMetadata
in interfaceX3DChildNode
- Specified by:
setMetadata
in interfaceX3DNode
- Specified by:
setMetadata
in interfaceX3DSensorNode
- Specified by:
setMetadata
in interfaceX3DTimeDependentNode
- 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 >= 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 interfaceX3DTimeDependentNode
- Returns:
- value of pauseTime field
-
setPauseTime
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 interfaceX3DTimeDependentNode
- 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 interfaceX3DTimeDependentNode
- Returns:
- value of resumeTime field
-
setResumeTime
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 interfaceX3DTimeDependentNode
- 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 interfaceX3DTimeDependentNode
- Returns:
- value of startTime field
-
setStartTime
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 interfaceX3DTimeDependentNode
- 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 interfaceX3DTimeDependentNode
- Returns:
- value of stopTime field
-
setStopTime
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 interfaceX3DTimeDependentNode
- 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
-