|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object at.wisch.joystick.ffeffect.direction.Direction
public abstract class Direction
The Class Direction. An object Direction specifies the direction from where
the force comes.
Most Controllers have 2 or 3 FF axes:
- X, Y and Z axis
- different rumble motors
The following diagram represents the cardinal directions:
.--. |__| .-------. |=.| |.-----.| |--| || || | | |'-----'| |__|˜')_____(' [ COMPUTER ] North ˆ | | West <----[ HAPTIC ]----> East | | v South [ USER ] \|||/ (o o) ---ooO-(_)-Ooo---Note: Because on some operating systems there is an issue with the order of the axes you might want to use PolarDirection objects to stay fully platform independent, if possible. On the other hand, be aware that some controllers, which have 3 FF axes, do not support PolarDirection.
Field Summary | |
---|---|
static int |
DIRECTION_CARTESIAN
The constant DIRECTION_CARTESIAN: the object is a CartesianDirection (casting is safe). |
static int |
DIRECTION_POLAR
The constant DIRECTION_POLAR: the object is a PolarDirection (casting is safe). |
static int |
DIRECTION_SPHERICAL
The constant DIRECTION_SPHERICAL: the object is a SphericalDirection (casting is safe). |
Method Summary | |
---|---|
int |
getDirectionType()
Gets the direction type. |
abstract java.lang.String |
getName()
Gets the direction type as a String. |
abstract CartesianDirection |
toCartesianDirection(Direction direction)
Converts the Direction to CartesianDirection. |
abstract PolarDirection |
toPolarDirection(Direction direction)
Converts the Direction to PolarDirection. |
abstract SphericalDirection |
toSphericalDirection(Direction direction)
Converts the Direction to SphericalDirection. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DIRECTION_POLAR
public static final int DIRECTION_SPHERICAL
public static final int DIRECTION_CARTESIAN
Method Detail |
---|
public int getDirectionType()
getName()
public abstract java.lang.String getName()
getDirectionType()
public abstract PolarDirection toPolarDirection(Direction direction)
direction
- the Direction to be converted
public abstract SphericalDirection toSphericalDirection(Direction direction)
direction
- the Direction to be converted
public abstract CartesianDirection toCartesianDirection(Direction direction)
direction
- the Direction to be converted
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |