2 import org.web3d.x3d.sai.*;
7 static final int ROWS = 2;
14 public void getValue(
double[] value)
throws ArrayIndexOutOfBoundsException {
17 StringTokenizer tokens;
19 if (value.length < ROWS) {
20 throw new ArrayIndexOutOfBoundsException(
"SFVec2d getValue passed array of insufficient size");
24 rep = browser.SendEventOut(nodePtr, offset, datasize, dataType,
command);
25 tokens =
new StringTokenizer(rep);
27 tokens =
new StringTokenizer(RLreturn);
30 for (count = 0; count < ROWS; count++) {
31 value[count] = Double.valueOf(tokens.nextToken()).doubleValue();
34 public void setValue(
double[] value)
throws ArrayIndexOutOfBoundsException {
35 if (value.length < ROWS) {
36 throw new ArrayIndexOutOfBoundsException(
"SFVec2d setValue passed degenerate value");
38 browser.newSendEvent(
this,
"" + value[0] +
" " + value[1]);