22 private float[] values =
new float[4];
24 public VSFRotation(
float axisX,
float axisY,
float axisZ,
float angle)
34 if (values.length != 4) {
35 this.values[0] = values[0];
36 this.values[1] = values[1];
37 this.values[2] = values[2];
38 this.values[3] = values[3];
44 public VSFRotation(DataInputStream in)
throws IOException
46 values[0] = in.readFloat();
47 values[1] = in.readFloat();
48 values[2] = in.readFloat();
49 values[3] = in.readFloat();
52 public void write(DataOutputStream out)
throws IOException
54 out.writeFloat(values[0]);
55 out.writeFloat(values[1]);
56 out.writeFloat(values[2]);
57 out.writeFloat(values[3]);
60 public String toString()
62 return "(" + values[0] +
", " + values[1] +
", " + values[2] +
", " + values[3] +
")";
65 public byte getType() {
return SFROTATION; }
67 public float[] getValue() {
73 public double getAngle() {
80 angle = (double)values[3] + (Math.PI/2);
83 angle = angle - (2*Math.PI);