FreeWRL/FreeX3D  3.0.0
EventInMFVec3f.java
1 package vrml.external.field;
3 import vrml.external.Node;
5 
6 public class EventInMFVec3f extends EventIn {
7 
8  public EventInMFVec3f() { EventType = FieldTypes.MFVEC3F; }
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 < 3) {
21  throw new IllegalArgumentException();
22  }
23  val = val + " " + value[count][0] + " " + value[count][1] + " " + value[count][2] + ",";
24  }
25  val = val + "]";
26  Browser.newSendEvent(this,val);
27 
28  return;
29  }
30 
31  public void set1Value(int index, float[] value) throws IllegalArgumentException {
32  if ((value == null) || (index < 0) || (value.length < 3)) {
33  throw new IllegalArgumentException();
34  }
35  Browser.newSendEvent(this, " ONEVAL " + index + " " + value[0] + " " + value[1] + " " + value[2]);
36  return;
37  }
38 }