home *** CD-ROM | disk | FTP | other *** search
Java Source | 1997-02-21 | 814 b | 37 lines |
- // A simple Rotationr class
-
- // Written by Bernie Roehl, December 1996
-
- package multi;
-
- import java.io.*;
-
- public class Rotation {
- protected float x = 0, y = 0, z = 1, a = 0;
-
- public float getX() { return x; }
- public float getY() { return y; }
- public float getZ() { return z; }
- public float getAngle() { return a; }
-
- public Rotation() { x = y = a = 0; z = 1; }
-
- public Rotation(float xv, float yv, float zv, float av) {
- x = xv;
- y = yv;
- z = zv;
- a = av;
- }
-
- public void read(DataInputStream in) throws IOException {
- x = in.readFloat();
- y = in.readFloat();
- z = in.readFloat();
- a = in.readFloat();
- }
-
- public String toString() { return x + " " + y + " " + z + " " + a; }
-
- }
-
-