17 package vrml.external.FreeWRLEAI;
28 public String[] gestures;
29 public boolean loaded =
false;
31 protected String name;
32 protected String [] fieldNames;
34 protected VField [] fields;
40 this.observer = observer;
41 fieldNames =
new String[VIP.NUM_FIELDS];
42 for (
short i = 0; i < VIP.NUM_FIELDS; i++) {
43 fieldNames[i] = VIP.fieldName(i);
46 fields[VIP.POSITION] =
new VSFVec3f(0.0F, 0.0F, 10.0F);
47 fields[VIP.ORIENTATION] =
new VSFRotation(0.0F, 0.0F, 1.0F, 0.0F);
48 fields[VIP.SCALE] =
new VSFVec3f(1.0F, 1.0F, 1.0F);
49 String[] strs = {
"" };
53 public String[] getFieldNames() {
57 public VField getField(
short field) {
61 public void setName(String name) {
65 public void setField(
short field,
VField value) {
67 fields[field] = value;
68 doSetField(field, value);
69 if (field ==
VIP.NAME) {
70 setName(((
VMFString) value).get1Value(0));
72 }
catch (ArrayIndexOutOfBoundsException e) {
73 System.err.println(
"unknown field " + field +
" in " +
this);
77 public String toString()
79 return (name != null ? name :
"" ) +
"(" +
id +
")";
82 protected void doSetField(
short field,
VField value) {}