instantreality 1.0

Component:
Time
Status:
fully implemented
Structure type:
concrete
Standard:
X3D2.0

TimeSensor

TimeSensor continuously generates events as time passes. Typical use: ROUTE thisTimeSensor.fraction_changed TO someInterpolator.set_fraction. Interchange profile hint: TimeSensor may be ignored if cycleInterval less then; 0.01 second.

Inheritance

Code

XML encoding
<TimeSensor cycleInterval='1'
loop='FALSE'
startTime='0'
stopTime='0'
pauseTime='0'
resumeTime='0'
triggerName='Timer'
description=''
enabled='TRUE'
logFeature=''
 />
Classic encoding
TimeSensor {
	cycleInterval 1
	loop FALSE
	startTime 0
	stopTime 0
	pauseTime 0
	resumeTime 0
	triggerName "Timer"
	description ""
	enabled TRUE
	logFeature [""]
}

Interface

Filter: X3D only | Avalon only | All
id Name DataType PartType Default ValueType Description
SFTime cycleInterval SFTime inputOutput 1 cycleInterval is loop duration in seconds. Interchange profile hint: TimeSensor may be ignored if cycleInterval less then; 0.01 second.
SFBool loop SFBool inputOutput FALSE Repeat indefinitely when loop=true, repeat only once when loop=false.
SFTime startTime SFTime inputOutput 0 When time now greater then;= startTime, isActive becomes true and TimeSensor becomes active. Absolute time: number of seconds since Jan 1, 1970, 00:00:00 GMT. Hint: usually receives a ROUTEd time value.
SFTime stopTime SFTime inputOutput 0 When stopTime becomes less then;= time now, isActive becomes false and TimeSensor becomes inactive. Absolute time: number of seconds since Jan 1, 1970, 00:00:00 GMT. Hint: usually receives a ROUTEd time value.
SFTime cycleTime SFTime outputOnly cycleTime sends a time outputOnly at startTime, and also at the beginning of each new cycle (useful for synchronization with other time-based objects).
SFTime pauseTime SFTime inputOutput 0 When time now greater then;= pauseTime, isPaused becomes true and TimeSensor becomes paused. Absolute time: number of seconds since Jan 1, 1970, 00:00:00 GMT. Hint: usually receives a ROUTEd time value. Warning: not supported in VRML97.
SFTime resumeTime SFTime inputOutput 0 When resumeTime becomes less then;= time now, isPaused becomes false and TimeSensor becomes inactive. Absolute time: number of seconds since Jan 1, 1970, 00:00:00 GMT. Hint: usually receives a ROUTEd time value. Warning: not supported in VRML97.
SFTime elapsedTime SFTime outputOnly Current elapsed time since TimeSensor activated/running, cumulative in seconds, and not counting any paused time. Warning: not supported in VRML97.
SFBool isPaused SFBool outputOnly isPaused true/false events are sent when TimeSensor is paused/resumed. Warning: not supported in VRML97.
SFFloat fraction_changed SFFloat outputOnly fraction_changed continuously sends value in range [0,1] showing time progress in the current cycle.
SFTime time SFTime outputOnly Time continuously sends the absolute time (since January 1, 1970) for a given simulation tick.
SFString description SFString inputOutput Text description to comment the sensor task. Can be used in run-time systems to give usefull feedback to the user and developer
SFBool enabled SFBool inputOutput TRUE Enables/disables the sensor node.
SFBool isActive SFBool outputOnly FALSE isActive true/false events are sent when the sensor gets active
SFNode metadata SFNode inputOutput MetadataObject container for payload metadata inside MetadataSet element