Package org.web3d.x3d.sai.Time
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).
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.
- Hint: event timing details are explained in X3D Specification 4.4.8.3 Execution model https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/concepts.html#ExecutionModel
- Hint: X3D Architecture 8 Time component https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/time.html
- Hint: example scenes and authoring assets at http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter07EventAnimationInterpolation
Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
-
Method Summary
Modifier and Type Method Description doublegetCycleInterval()Provide double value in seconds within allowed range of [0,infinity) from inputOutput SFTime field named cycleInterval.doublegetCycleTime()Provide double value in seconds within allowed range of [0,infinity) from outputOnly SFTime field named cycleTime.doublegetElapsedTime()Provide double value in seconds within allowed range of [0,infinity) from outputOnly SFTime field named elapsedTime.booleangetEnabled()Provide boolean value from inputOutput SFBool field named enabled.floatgetFraction()Provide float value from outputOnly SFFloat field named fraction_changed.booleangetIsActive()Provide boolean value from outputOnly SFBool field named isActive.booleangetIsPaused()Provide boolean value from outputOnly SFBool field named isPaused.booleangetLoop()Provide boolean value from inputOutput SFBool field named loop.X3DMetadataObjectgetMetadata()Provide X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.doublegetPauseTime()Provide double value in seconds from inputOutput SFTime field named pauseTime.doublegetResumeTime()Provide double value in seconds from inputOutput SFTime field named resumeTime.doublegetStartTime()Provide double value in seconds from inputOutput SFTime field named startTime.doublegetStopTime()Provide double value in seconds from inputOutput SFTime field named stopTime.doublegetTime()Provide double value in seconds within allowed range of [0,infinity) from outputOnly SFTime field named time.TimeSensorsetCycleInterval(double newValue)Accessor method to assign double value in seconds to inputOutput SFTime field named cycleInterval.TimeSensorsetEnabled(boolean newValue)Accessor method to assign boolean value to inputOutput SFBool field named enabled.TimeSensorsetLoop(boolean newValue)Accessor method to assign boolean value to inputOutput SFBool field named loop.TimeSensorsetMetadata(X3DMetadataObject newValue)Accessor method to assign X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.TimeSensorsetPauseTime(double newValue)Accessor method to assign double value in seconds to inputOutput SFTime field named pauseTime.TimeSensorsetResumeTime(double newValue)Accessor method to assign double value in seconds to inputOutput SFTime field named resumeTime.TimeSensorsetStartTime(double newValue)Accessor method to assign double value in seconds to inputOutput SFTime field named startTime.TimeSensorsetStopTime(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
-
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:
getElapsedTimein 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:
getEnabledin 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:
setEnabledin 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:
getIsActivein interfaceX3DSensorNode- Specified by:
getIsActivein 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:
getIsPausedin 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. *- Specified by:
getLoopin interfaceX3DTimeDependentNode- 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. *- Specified by:
setLoopin interfaceX3DTimeDependentNode- 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.
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/documents/specifications/19775-1/V3.3/Part01/components/core.html#Metadata
- Specified by:
getMetadatain interfaceX3DChildNode- Specified by:
getMetadatain interfaceX3DNode- Specified by:
getMetadatain interfaceX3DSensorNode- Specified by:
getMetadatain interfaceX3DTimeDependentNode- Returns:
- value of metadata field
- See Also:
- X3D Scene Authoring Hints: Metadata Nodes
-
setMetadata
Accessor method to assign 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/documents/specifications/19775-1/V3.3/Part01/components/core.html#Metadata
- Specified by:
setMetadatain interfaceX3DChildNode- Specified by:
setMetadatain interfaceX3DNode- Specified by:
setMetadatain interfaceX3DSensorNode- Specified by:
setMetadatain 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:
- 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:
getPauseTimein 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:
setPauseTimein 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:
getResumeTimein 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:
setResumeTimein 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:
getStartTimein 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:
setStartTimein 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:
getStopTimein 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:
setStopTimein 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
-