|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.geometry.xy.XyRotation
public class XyRotation
A rotation, expressed as an angle left (clockwise) or right (counter-clockwise).
Copyright 2007 Partner Software, Inc.
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
XyRotation |
flipped()
Returns a modified version of this rotation with the angle flipped (leftTurn is set to the opposite of this deflection's setting). |
static XyRotation |
forLeft(XyAngle angle)
Returns the given rotation to the left. |
static XyRotation |
forLeftDegrees(double degrees)
Returns the given rotation in degrees to the left. |
static XyRotation |
forLeftRadians(double radians)
Returns the given rotation in radians to the left. |
static XyRotation |
forRight(XyAngle angle)
Returns the given rotation to the right. |
static XyRotation |
forRightDegrees(double degrees)
Returns the given rotation in degrees to the right. |
static XyRotation |
forRightRadians(double radians)
Returns the given rotation in radians to the right. |
XyAngle |
getAngle()
Returns the rotation angle. |
double |
getLeftDegrees()
Returns the rotation angle as a left turn (counter-clockwise) in degrees. |
double |
getLeftRadians()
Returns the rotation angle as a left turn (counter-clockwise) in radians. |
double |
getRightDegrees()
Returns the rotation angle as a right turn (clockwise) in degrees. |
double |
getRightRadians()
Returns the rotation angle as a right turn (clockwise) in radians. |
boolean |
isClockwise()
Returns true if rotation represents a right, or clockwise, turn. |
boolean |
isCounterClockwise()
Returns true if rotation represents a left, or counter-clockwise turn. |
boolean |
isLeftTurn()
Returns true if rotation represents a left, or counter-clockwise turn. |
boolean |
isRightTurn()
Returns true if rotation represents a right, or clockwise, turn. |
boolean |
isStraight()
Returns true if rotation is no rotation at all. |
XyRotation |
minus(XyRotation nother)
Subtracts the given rotation from this one. |
XyRotation |
plus(XyRotation nother)
Adds the given rotation to this one. |
XyRotation |
rotatedBy(XyRotation rotation)
Uses the given XyRotation to rotate the given amount in the appropriate direction. |
XyRotation |
rotatedClockwiseBy(XyAngle angle)
Uses the given XyAngle to rotate the given amount in the clockwise direction and return the result. |
XyRotation |
rotatedCounterClockwiseBy(XyAngle angle)
Uses the given XyAngle to rotate the given amount in the counter-clockwise direction (widdershins!) and return the result. |
XyRotation |
rotatedWiddershinsBy(XyAngle angle)
More flavorful (and also shorter) Lowland Scots term for rotatedCounterClockwiseBy(XyAngle). |
XyRotation |
times(double factor)
Multiplies the rotation by the given factor. |
java.lang.String |
toString()
|
XyRotation |
turnLeft(XyAngle angle)
Synonym for rotatedCounterClockwiseBy(XyAngle). |
XyRotation |
turnRight(XyAngle angle)
Synonym for rotatedClockwiseBy(XyAngle). |
XyRotation |
withAngle(XyAngle newAngle)
Returns a modified version of this rotation with the given angle. |
XyRotation |
withLeftTurn(boolean newLeftTurn)
Returns a modified version of this rotation with the given leftTurn flag. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static XyRotation forLeft(XyAngle angle)
public static XyRotation forRight(XyAngle angle)
public static XyRotation forLeftDegrees(double degrees)
public static XyRotation forRightDegrees(double degrees)
public static XyRotation forLeftRadians(double radians)
public static XyRotation forRightRadians(double radians)
public XyRotation withAngle(XyAngle newAngle)
public XyRotation withLeftTurn(boolean newLeftTurn)
public XyRotation flipped()
public XyRotation rotatedBy(XyRotation rotation)
public XyRotation rotatedClockwiseBy(XyAngle angle)
public XyRotation rotatedCounterClockwiseBy(XyAngle angle)
public XyRotation rotatedWiddershinsBy(XyAngle angle)
rotatedCounterClockwiseBy(XyAngle). See the wiki entry.
public XyRotation turnLeft(XyAngle angle)
rotatedCounterClockwiseBy(XyAngle).
public XyRotation turnRight(XyAngle angle)
rotatedClockwiseBy(XyAngle).
public XyRotation plus(XyRotation nother)
rotatedBy(XyRotation).
public XyRotation minus(XyRotation nother)
public XyRotation times(double factor)
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic XyAngle getAngle()
public boolean isLeftTurn()
public boolean isRightTurn()
public boolean isCounterClockwise()
public boolean isClockwise()
public boolean isStraight()
public double getLeftRadians()
public double getLeftDegrees()
public double getRightRadians()
public double getRightDegrees()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||