added rotational axis too

This commit is contained in:
Brian Matzon 2003-01-23 21:38:33 +00:00
parent 9cdf5d7156
commit 99e22aa0b4
3 changed files with 116 additions and 15 deletions

View file

@ -67,13 +67,22 @@ public class Controller {
/** X position, range -1000 to 1000 */
public static int x = 0;
/** X rotational position, range -1000 to 1000 */
public static int rx = 0;
/** Y position, range -1000 to 1000 */
public static int y = 0;
/** Y rotational position, range -1000 to 1000 */
public static int ry = 0;
/** Z position, range -1000 to 1000 */
public static int z = 0;
/** Z rotational position, range -1000 to 1000 */
public static int rz = 0;
/** Position of Point of View from -1 to 27000 (360 degrees) */
public static int pov;
@ -98,8 +107,11 @@ public class Controller {
/* Controller capabilities */
public static int buttonCount = -1;
public static boolean hasXAxis = false;
public static boolean hasRXAxis = false;
public static boolean hasYAxis = false;
public static boolean hasZAxis = false;
public static boolean hasRYAxis = false;
public static boolean hasZAxis = false;
public static boolean hasRZAxis = false;
public static boolean hasPOV = false;
public static boolean hasSlider = false;

View file

@ -95,18 +95,33 @@ public class ControllerTest extends Panel {
if(Controller.hasXAxis) {
g.drawString("x : " + Controller.x, x, y);
y += 20;
}
}
if(Controller.hasRXAxis) {
g.drawString("rx : " + Controller.rx, x, y);
y += 20;
}
if(Controller.hasYAxis) {
g.drawString("y : " + Controller.y, x, y);
y += 20;
}
if(Controller.hasRYAxis) {
g.drawString("ry : " + Controller.ry, x, y);
y += 20;
}
if (Controller.hasZAxis) {
g.drawString("z : " + Controller.z, x, y);
y += 20;
}
if (Controller.hasRZAxis) {
g.drawString("rz : " + Controller.rz, x, y);
y += 20;
}
if (Controller.hasPOV) {
g.drawString("pov: " + Controller.pov, x, y);
y += 20;