Class Orientation
- java.lang.Object
-
- org.noise_planet.noisemodelling.pathfinder.utils.geometry.Orientation
-
public class Orientation extends Object
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.
-
-
Constructor Summary
Constructors Constructor Description Orientation()
Default constructorOrientation(double yaw, double pitch, double roll)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Compare two orientationsstatic Orientation
fromVector(org.locationtech.jts.math.Vector3D vector, double roll)
int
hashCode()
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 orientationstatic 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 orientationString
toString()
static org.locationtech.jts.math.Vector3D
toVector(Orientation orientation)
-
-
-
Constructor Detail
-
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 Detail
-
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
public static Orientation fromVector(org.locationtech.jts.math.Vector3D vector, double roll)
- Parameters:
vector
-roll
-- Returns:
-
toVector
public static org.locationtech.jts.math.Vector3D toVector(Orientation orientation)
- Parameters:
orientation
-- Returns:
-
equals
public boolean equals(Object o)
Compare two orientations
-
-