Returns the current value of the SFRotation event-out slot.
Declaring type: EventOutSFRotation
Namespace: Vrml.EAI.Field
Assembly: VrmlEAI.NET
Collapse/Expand Syntax
C#
public abstract float[] GetValue ()
Return Value
The rotation as an array of four floats. The first three elements contain the x, y and z coordinate of the rotation axis. The fourth element contains the rotation angle, in radians.
Collapse/Expand Example
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 = orientation_changed.GetValue();
System.Console.WriteLine("x = " + rotation[0] + ", y = " + rotation[1] + ", z = " + rotation[2] + ", angle = " + rotation[3]);