Package org.openstreetmap.josm.tools
Class RotationAngle.WayDirectionRotationAngle
- java.lang.Object
-
- org.openstreetmap.josm.tools.RotationAngle.WayDirectionRotationAngle
-
- All Implemented Interfaces:
RotationAngle
- Enclosing interface:
- RotationAngle
public static final class RotationAngle.WayDirectionRotationAngle extends java.lang.Object implements RotationAngle
The rotation along a way.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.openstreetmap.josm.tools.RotationAngle
RotationAngle.StaticRotationAngle, RotationAngle.WayDirectionRotationAngle
-
-
Field Summary
-
Fields inherited from interface org.openstreetmap.josm.tools.RotationAngle
NO_ROTATION
-
-
Constructor Summary
Constructors Constructor Description WayDirectionRotationAngle()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
double
getRotationAngle(IPrimitive p)
Calculates the rotation angle depending on the primitive to be displayed.static java.lang.Double
getRotationAngleForNodeOnWay(Node n, Way w)
Calculates the rotation angle of a node in a way based on the preceding way segment.int
hashCode()
java.lang.String
toString()
-
-
-
Constructor Detail
-
WayDirectionRotationAngle
public WayDirectionRotationAngle()
-
-
Method Detail
-
getRotationAngle
public double getRotationAngle(IPrimitive p)
Description copied from interface:RotationAngle
Calculates the rotation angle depending on the primitive to be displayed.- Specified by:
getRotationAngle
in interfaceRotationAngle
- Parameters:
p
- primitive- Returns:
- rotation angle in radians, clockwise starting from up/north
-
getRotationAngleForNodeOnWay
public static java.lang.Double getRotationAngleForNodeOnWay(Node n, Way w)
Calculates the rotation angle of a node in a way based on the preceding way segment. If the node is the first node in the given way, the angle of the following way segment is used instead.- Parameters:
n
- the node to get the rotation angle forw
- the way containing the node- Returns:
- the rotation angle in radians or null if the way does not contain the node
- Since:
- 18661
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-