@FunctionalInterface public interface RotationAngle
gui.util
package)Modifier and Type | Interface and Description |
---|---|
static class |
RotationAngle.StaticRotationAngle
A static rotation
|
static class |
RotationAngle.WayDirectionRotationAngle
The rotation along a way.
|
Modifier and Type | Field and Description |
---|---|
static RotationAngle |
NO_ROTATION
A no-rotation angle that always returns 0.
|
Modifier and Type | Method and Description |
---|---|
static RotationAngle |
buildStaticRotation(double angle)
Always returns the fixed
angle . |
static RotationAngle |
buildStaticRotation(java.lang.String string)
Parses the rotation angle from the specified
string . |
static RotationAngle |
buildWayDirectionRotation()
Computes the angle depending on the referencing way segment, or
0 if none exists. |
double |
getRotationAngle(IPrimitive p)
Calculates the rotation angle depending on the primitive to be displayed.
|
static double |
parseCardinalRotation(java.lang.String cardinal)
Converts an angle diven in cardinal directions to radians.
|
static final RotationAngle NO_ROTATION
double getRotationAngle(IPrimitive p)
p
- primitivestatic RotationAngle buildStaticRotation(double angle)
angle
.angle
- anglestatic RotationAngle buildStaticRotation(java.lang.String string)
string
.string
- angle as stringstatic double parseCardinalRotation(java.lang.String cardinal)
n
, north
, ne
, northeast
,
e
, east
, se
, southeast
, s
, south
,
sw
, southwest
, w
, west
, nw
, northwest
.cardinal
- the angle in cardinal directionsstatic RotationAngle buildWayDirectionRotation()
0
if none exists.