Class 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 Detail

      • yaw

        public double yaw
      • pitch

        public double pitch
      • roll

        public double roll
    • 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 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: