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.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    double
     
    double
     
    double
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor
    Orientation(double yaw, double pitch, double roll)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Compare two orientations
    fromVector(org.locationtech.jts.math.Vector3D vector, double roll)
     
    int
     
    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
    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
     
    static org.locationtech.jts.math.Vector3D
    toVector(Orientation orientation)
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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

      public String toString()
      Overrides:
      toString in class Object
    • 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 apply
      vector - 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 apply
      vector - Vector to rotate
      inverse - 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
      Overrides:
      equals in class Object
      Parameters:
      o -
      Returns:
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
      Returns: