2 import org.web3d.x3d.sai.*;
7 private static int ROWS = 4;
14 public void getValue(
float[] value)
throws ArrayIndexOutOfBoundsException {
15 StringTokenizer tokens;
19 if (value.length < ROWS) {
20 throw new ArrayIndexOutOfBoundsException(
"SFRotation 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] = Float.valueOf(tokens.nextToken()).floatValue();
34 public void setValue(
float[] value)
throws ArrayIndexOutOfBoundsException {
35 if (value.length < ROWS) {
36 throw new ArrayIndexOutOfBoundsException(
"SFRotation setValue passed degenerate rotation value");
38 browser.newSendEvent(
this,
"" + value[0] +
" " + value[1] +
" " + value[2] +
" " + value[3]);