FreeWRL/FreeX3D  3.0.0
EventInMFRotation.java
1 package vrml.external.field;
3 import vrml.external.Node;
5 
6 public class EventInMFRotation extends EventIn {
7 
8  public EventInMFRotation() { EventType = FieldTypes.MFROTATION; }
9 
10  public void setValue(float[][] value) throws IllegalArgumentException {
11  int count;
12  String val;
13 
14  if (value == null) {
15  throw new IllegalArgumentException();
16  }
17  val = "[";
18 
19  for (count = 0; count < value.length; count++) {
20  if (value[count].length < 4) {
21  throw new IllegalArgumentException();
22  }
23  val = val + " " + value[count][0] + " " + value[count][1] + " " + value[count][2] + " " + value[count][3] + ",";
24  }
25  val = val + "]";
26  Browser.newSendEvent(this,val);
27 
28 
29  return;
30  }
31 
32  public void set1Value(int index, float[] value) throws IllegalArgumentException {
33  if ((value == null) || (index < 0) || (value.length < 4)) {
34  throw new IllegalArgumentException();
35  }
36  Browser.newSendEvent(this, " ONEVAL " + index + " " + value[0] + " " + value[1] + " " + value[2] + " " + value[3]);
37  return;
38  }
39 }