package org.j3de.input;
import java.util.List;
import java.util.Vector;
import javax.media.j3d.InputDevice;
import javax.media.j3d.Sensor;
public class InputDevices {
private VirtualInputDevice[] vdevices;
private Vector sensors; private int userHead;
private int dominantHand;
private int nonDominantHand;
private int movementDevice;
public InputDevices(List devices,
ActivationManager activationManager,
int userHead,
int dominantHand,
int nonDominantHand,
int movementDevice) {
this.vdevices = new VirtualInputDevice[devices.size()];
this.sensors = new Vector();
for (int i=0; i vdevices[i] = new VirtualInputDevice((InputDevice)devices.get(i), activationManager);
for (int j=0; j sensors.add(vdevices[i].getSensor(j));
}
this.userHead = userHead;
this.dominantHand = dominantHand;
this.nonDominantHand = nonDominantHand;
this.movementDevice = movementDevice;
}
public int getDeviceCount() {
return vdevices.length;
}
public int getSensorCount() {
return sensors.size();
} public Sensor getSensor(int i) { return (Sensor)sensors.get(i); }
public InputDevice getDevice(int index) {
return vdevices[index];
}
public int getUserHead() {
return userHead;
}
public int getDominantHand() {
return dominantHand;
}
public int getNonDominantHand() {
return nonDominantHand;
}
public int getMovementSensor() {
return movementDevice;
}
}