Returns the current value of the SFRotation event-out slot.
C# |
---|
public abstract void GetValue (
float[] value
) |
The following example demonstrates how to get the current
orientation of the active Viewpoint from a ProximitySensor,
and prints it to the console:
C# |
---|
Vrml.EAI.Node proximitySensor = ...;
Vrml.EAI.Field.EventOutSFRotation orientation_changed = (Vrml.EAI.Field.EventOutSFRotation)proximitySensor.GetEventOut("orientation_changed");
float[] rotation = new float[4];
orientation_changed.GetValue(rotation);
System.Console.WriteLine("x = " + rotation[0] + ", y = " + rotation[1] + ", z = " + rotation[2] + ", angle = " + rotation[3]);
|