Class Orientation
java.lang.Object
org.noise_planet.noisemodelling.pathfinder.utils.geometry.Orientation
When providing Orientation to a sound source there is 2 cases
- Sound source is a point. The final orientation is the same, relative to the north and clock-wise to east.
- Sound source is a line. The final orientation is rotated by the line direction.
So 0 degrees point the end of the line segment.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompare two orientationsstatic OrientationfromVector(org.locationtech.jts.math.Vector3D vector, double roll) inthashCode()static org.locationtech.jts.math.Vector3Drotate(Orientation orientation, org.locationtech.jts.math.Vector3D vector) Rotate the vector by the provided orientation and return the result vector orientationstatic org.locationtech.jts.math.Vector3Drotate(Orientation orientation, org.locationtech.jts.math.Vector3D vector, boolean inverse) Rotate the vector by the provided orientation and return the result vector orientationtoString()static org.locationtech.jts.math.Vector3DtoVector(Orientation orientation)
-
Field Details
-
yaw
public double yaw -
pitch
public double pitch -
roll
public double roll
-
-
Constructor Details
-
Orientation
public Orientation()Default constructor -
Orientation
public Orientation(double yaw, double pitch, double roll) - Parameters:
yaw- Orientation using degrees east of true north (0 is north, 90 is east)pitch- Vertical orientation in degrees. (0 flat, 90 vertical top, -90 vertical bottom)roll- Longitudinal axis in degrees. A positive value lifts the left wing and lowers the right wing.
-
-
Method Details
-
toString
-
rotate
public static org.locationtech.jts.math.Vector3D rotate(Orientation orientation, org.locationtech.jts.math.Vector3D vector) Rotate the vector by the provided orientation and return the result vector orientation- Parameters:
orientation- Rotation to applyvector- Vector to rotate- Returns:
- New vector orientation
-
rotate
public static org.locationtech.jts.math.Vector3D rotate(Orientation orientation, org.locationtech.jts.math.Vector3D vector, boolean inverse) Rotate the vector by the provided orientation and return the result vector orientation- Parameters:
orientation- Rotation to applyvector- Vector to rotateinverse- True to inverse rotation- Returns:
- New vector orientation
-
fromVector
- Parameters:
vector-roll-- Returns:
-
toVector
- Parameters:
orientation-- Returns:
-
equals
Compare two orientations -
hashCode
public int hashCode()
-