FreeWRL/FreeX3D  3.0.0
EventOutSFRotation.java
1 package vrml.external.field;
2 import java.util.*;
5 
6 public class EventOutSFRotation extends EventOut {
7  public EventOutSFRotation() {EventType = FieldTypes.SFROTATION;}
8 
9  public float[] getValue() {
10 
11 
12  float[] fvals = new float[4];
13  StringTokenizer tokens;
14  String rep;
15 
16  if (RLreturn == null) {
17  rep = Browser.SendEventOut (nodeptr, offset, datasize, datatype, command);
18  } else {
19  rep = RLreturn;
20  }
21  tokens = new StringTokenizer (rep);
22 
23  fvals[0]=Float.valueOf(tokens.nextToken()).floatValue();
24  fvals[1]=Float.valueOf(tokens.nextToken()).floatValue();
25  fvals[2]=Float.valueOf(tokens.nextToken()).floatValue();
26  fvals[3]=Float.valueOf(tokens.nextToken()).floatValue();
27 
28  return fvals;
29  }
30 }