Class Angle3d

java.lang.Object
org.opentrafficsim.core.math.Angle3d
All Implemented Interfaces:
Serializable

public class Angle3d 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 relative, and can relate to e.g. the inertial frame of a GTU.

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

Author:
Alexander Verbraeck, Peter Knoppers
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Angle3d(double roll, double pitch, double yaw, org.djunits.unit.AngleUnit unit)
     
    Angle3d(org.djunits.value.vdouble.scalar.Angle roll, org.djunits.value.vdouble.scalar.Angle pitch, org.djunits.value.vdouble.scalar.Angle yaw)
     
    Angle3d(org.djunits.value.vdouble.vector.AngleVector rotation)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final org.djunits.value.vdouble.scalar.Angle
     
    final org.djunits.value.vdouble.scalar.Angle
     
    final org.djunits.value.vdouble.scalar.Angle
     
    final String

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Angle3d

      public Angle3d(org.djunits.value.vdouble.vector.AngleVector rotation) throws org.djunits.value.ValueRuntimeException
      Parameters:
      rotation - AngleVector; the angles of the rotation in 3D (RPY coded)
      Throws:
      org.djunits.value.ValueRuntimeException - in case the vector does not have exactly three elements
    • Angle3d

      public Angle3d(org.djunits.value.vdouble.scalar.Angle roll, org.djunits.value.vdouble.scalar.Angle pitch, org.djunits.value.vdouble.scalar.Angle yaw) throws org.djunits.value.ValueRuntimeException
      Parameters:
      roll - Angle; (phi) the rotation around the x-axis
      pitch - Angle; (theta) the rotation around the y-axis
      yaw - Angle; (psi) the rotation around the z-axis
      Throws:
      org.djunits.value.ValueRuntimeException - in case the units are incorrect
    • Angle3d

      public Angle3d(double roll, double pitch, double yaw, org.djunits.unit.AngleUnit unit) throws org.djunits.value.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 - AngleUnit; the unit of the RPY parameters
      Throws:
      org.djunits.value.ValueRuntimeException - in case the units are incorrect
  • Method Details

    • getRoll

      public final org.djunits.value.vdouble.scalar.Angle getRoll()
      Returns:
      the roll.
    • getPitch

      public final org.djunits.value.vdouble.scalar.Angle getPitch()
      Returns:
      the pitch.
    • getYaw

      public final org.djunits.value.vdouble.scalar.Angle getYaw()
      Returns:
      the yaw.
    • toString

      public final String toString()
      Overrides:
      toString in class Object