6 import java.io.BufferedReader;
7 import java.io.PrintWriter;
8 import java.io.IOException;
15 this(rotations.length, rotations);
19 for (
int i = 0; i < size; i += 4)
20 __vect.addElement(
new ConstSFRotation(rotations[i], rotations[i+1], rotations[i+2], rotations[i+3]));
24 for (
int i = 0; i < rotations.length; i++)
25 __vect.addElement(
new ConstSFRotation(rotations[i][0], rotations[i][1], rotations[i][2], rotations[i][3]));
28 public void getValue(
float[] rotations) {
30 int size = __vect.size();
31 for (
int i = 0; i < size; i++) {
33 rotations[4*i+0] = sfRotation.axisX;
34 rotations[4*i+1] = sfRotation.axisY;
35 rotations[4*i+2] = sfRotation.axisZ;
36 rotations[4*i+3] = sfRotation.angle;
40 public void getValue(
float[][] rotations) {
42 int size = __vect.size();
43 for (
int i = 0; i < size; i++)
47 public void get1Value(
int index,
float[] rotations) {
52 public void get1Value(
int index,
SFRotation sfRotation) {
57 public String toString() {
59 StringBuffer sb =
new StringBuffer(
"[");
60 int size = __vect.size();
61 for (
int i = 0; i < size; i++) {
62 if (i > 0) sb.append(
", ");
63 sb.append(__vect.elementAt(i));
65 return sb.append(
"]").toString();
68 public void __fromPerl(BufferedReader in)
throws IOException {
70 String lenline = in.readLine();
73 int len = Integer.parseInt(lenline);
74 for (
int i = 0; i < len; i++) {
77 __vect.addElement(sf);
81 public void __toPerl(PrintWriter out)
throws IOException {
82 StringBuffer sb =
new StringBuffer(
"");
83 int size = __vect.size();
85 for (
int i = 0; i < size; i++) {
87 if (i != (size-1)) out.print (
", ");