Reference to a SFTime event-in slot.
C# |
---|
public abstract class EventInSFTime : |
EventIn
|
|
Click here to see the list of members.
The following example demonstrates how to start a TimeSensor
in 5 seconds from the current time:
C# |
---|
Vrml.EAI.Node timeSensor = ...;
Vrml.EAI.Field.EventInSFTime set_startTime = (Vrml.EAI.Field.EventInSFTime)timeSensor.GetEventIn("set_startTime");
System.DateTime baseTime = new System.DateTime(1970, 1, 1, 0, 0, 0, 0, System.DateTimeKind.Utc);
System.TimeSpan deltaTime = System.DateTime.UtcNow.Subtract(baseTime);
set_startTime.SetValue(deltaTime.TotalSeconds + 5.0);
|