Class Direction3D

  • All Implemented Interfaces:
    Serializable

    public class Direction3D
    extends Object
    implements Serializable
    3D-rotation, RPY coded (longitudinal roll along the x-axis, lateral pitch along the y-axis and vertical yaw along the z-axis), also called Tait–Bryan angles or Cardan angles. Angles are absolute and relate to the absolute XYZ-frame of the world.

    Copyright (c) 2013-2022 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
    BSD-style license. See OpenTrafficSim License.

    $LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, initial version Dec 10, 2015
    Author:
    Alexander Verbraeck, Peter Knoppers
    See Also:
    Serialized Form
    • Constructor Detail

      • Direction3D

        public Direction3D​(Direction roll,
                           Direction pitch,
                           Direction yaw)
                    throws ValueRuntimeException
        Parameters:
        roll - Direction; (phi) the rotation around the x-axis
        pitch - Direction; (theta) the rotation around the y-axis
        yaw - Direction; (psi) the rotation around the z-axis
        Throws:
        ValueRuntimeException - in case the units are incorrect
      • Direction3D

        public Direction3D​(double roll,
                           double pitch,
                           double yaw,
                           DirectionUnit unit)
                    throws ValueRuntimeException
        Parameters:
        roll - double; (phi) the rotation around the x-axis
        pitch - double; (theta) the rotation around the y-axis
        yaw - double; (psi) the rotation around the z-axis
        unit - DirectionUnit; the unit of the RPY parameters
        Throws:
        ValueRuntimeException - in case the units are incorrect
    • Method Detail

      • getRoll

        public final Direction getRoll()
        Returns:
        the roll.
      • getPitch

        public final Direction getPitch()
        Returns:
        the pitch.
      • getYaw

        public final Direction getYaw()
        Returns:
        the yaw.