|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.wisch.joystick.ffeffect.direction.Direction
at.wisch.joystick.ffeffect.direction.PolarDirection
public class PolarDirection
The Class PolarDirection. A PolarDirection is specified by polar coordinates in degrees, clockwise, starting from NORTH.
The degree value is encoded by hundredths of a
degree starting from north and turning clockwise. The cardinal directions would be:
- North: 0 (0 degrees)
- East: 9000 (90 degrees)
- South: 18000 (180 degrees)
- West: 27000 (270 degrees)
Field Summary | |
---|---|
static int |
EAST
The constant EAST (9000 ): force comes from right. |
static int |
NORTH
The constant NORTH (0 ): force comes from top. |
static int |
NORTHEAST
The constant NORTHEAST (4500 ): force comes from top-right. |
static int |
NORTHWEST
The constant NORTHWEST (31500 ): force comes from top-left. |
static int |
SOUTH
The constant SOUTH (18000 ) force comes from bottom. |
static int |
SOUTHEAST
The constant SOUTHEAST (13500 ): force comes from bottom-right. |
static int |
SOUTHWEST
The constant SOUTHWEST (22500 ): force comes bottom down-left. |
static int |
WEST
The constant WEST (27000 ): force comes from left. |
Fields inherited from class at.wisch.joystick.ffeffect.direction.Direction |
---|
DIRECTION_CARTESIAN, DIRECTION_POLAR, DIRECTION_SPHERICAL |
Constructor Summary | |
---|---|
PolarDirection()
Instantiates a new polar direction with the default direction (NORTHWEST). |
|
PolarDirection(int polarDirection)
Instantiates a new polar direction with the specified direction value. |
Method Summary | |
---|---|
java.lang.String |
getName()
Gets the direction type as a String. |
int |
getPolarDirection()
Gets the polar direction value. |
void |
setPolarDirection(int polarDirection)
Sets the polar direction value. |
CartesianDirection |
toCartesianDirection(Direction direction)
Converts the Direction to CartesianDirection. |
PolarDirection |
toPolarDirection(Direction direction)
Converts the Direction to PolarDirection. |
SphericalDirection |
toSphericalDirection(Direction direction)
Converts the Direction to SphericalDirection. |
Methods inherited from class at.wisch.joystick.ffeffect.direction.Direction |
---|
getDirectionType |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NORTH
public static final int NORTHEAST
public static final int EAST
public static final int SOUTHEAST
public static final int SOUTH
public static final int SOUTHWEST
public static final int WEST
public static final int NORTHWEST
Constructor Detail |
---|
public PolarDirection(int polarDirection)
polarDirection
- the polar direction (values from 0 to 35999)public PolarDirection()
Method Detail |
---|
public int getPolarDirection()
public void setPolarDirection(int polarDirection)
polarDirection
- the new polar direction (values from 0 to 35999)public java.lang.String getName()
getName
in class Direction
Direction.getDirectionType()
public CartesianDirection toCartesianDirection(Direction direction)
Direction
toCartesianDirection
in class Direction
direction
- the Direction to be converted
public PolarDirection toPolarDirection(Direction direction)
this
(not a copy, but really this object)
toPolarDirection
in class Direction
direction
- the Direction to be converted
public SphericalDirection toSphericalDirection(Direction direction)
toSphericalDirection
in class Direction
direction
- the Direction to be converted
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |