Enum CoordinateSystem3D

  • All Implemented Interfaces:
    Serializable, Comparable<CoordinateSystem3D>, CoordinateSystem

    public enum CoordinateSystem3D
    extends Enum<CoordinateSystem3D>
    implements CoordinateSystem
    Represents the different kind of 3D referencials and provides the conversion utilities.

    A referencial axis is expressed by the front, left and top directions. For example XYZ_LEFT_HAND is for the coordinate system with front direction along +/-X axis, left direction along the +/-Y axis and top direction along the +/-Z axis according to a "left-hand" heuristic.

    The default coordinate system is:

    • front: (1, 0, 0)
    • left: (0, 1, 0)
    • top: (0, 0, 1)

    Rotations

    Rotations in a 3D coordinate system follow the right/left hand rules (assuming that OX, OY and OZ are the three axis of the coordinate system):

    Right-handed rule:
    • axis cycle is: OX > OY > OZ > OX > OY;
    • when rotating around OX, positive rotation angle is going from OY to OZ
    • when rotating around OY, positive rotation angle is going from OZ to OX
    • when rotating around OZ, positive rotation angle is going from OX to OY

    [Right-handed Rotation Rule]
    Left-handed rule:
    • axis cycle is: OX > OY > OZ > OX > OY;
    • when rotating around OX, positive rotation angle is going from OY to OZ
    • when rotating around OY, positive rotation angle is going from OZ to OX
    • when rotating around OZ, positive rotation angle is going from OX to OY

    [Left-handed Rotation Rule]
    Since:
    13.0
    Version:
    17.0 2020-01-04 14:41:43
    Author:
    Stéphane GALLAND
    Maven Group Id:
    org.arakhne.afc.core
    Maven Artifact Id:
    mathgeom
    • Enum Constant Detail

      • XZY_LEFT_HAND

        public static final CoordinateSystem3D XZY_LEFT_HAND
        Left handed XZY coordinate system.

        [Left Handed XZY Coordinate System]

      • XYZ_LEFT_HAND

        public static final CoordinateSystem3D XYZ_LEFT_HAND
        Left handed XYZ coordinate system.

        [Left Handed XYZ Coordinate System]

      • XZY_RIGHT_HAND

        public static final CoordinateSystem3D XZY_RIGHT_HAND
        Right handed XZY coordinate system.

        [Right Handed XZY Coordinate System]

      • XYZ_RIGHT_HAND

        public static final CoordinateSystem3D XYZ_RIGHT_HAND
        Right handed XYZ coordinate system.

        [Right Handed XYZ Coordinate System]

    • Method Detail

      • values

        public static CoordinateSystem3D[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (CoordinateSystem3D c : CoordinateSystem3D.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static CoordinateSystem3D valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • isRightHanded

        @Pure
        public boolean isRightHanded()
        Replies if this coordinate system is a right-hand coordinate system..
        Specified by:
        isRightHanded in interface CoordinateSystem
        Returns:
        true if this coordinate system is right-handed, otherwise false
      • isLeftHanded

        @Pure
        public boolean isLeftHanded()
        Replies if this coordinate system is a left-hand coordinate system..
        Specified by:
        isLeftHanded in interface CoordinateSystem
        Returns:
        true if this coordinate system is left-handed, otherwise false
      • getDefaultCoordinateSystem

        @Pure
        public static CoordinateSystem3D getDefaultCoordinateSystem()
        Replies the preferred coordinate system.
        Returns:
        the preferred coordinate system.
      • getDimensions

        @Pure
        public final int getDimensions()
        Replies the count of dimension in this space referential..
        Specified by:
        getDimensions in interface CoordinateSystem
        Returns:
        the count of dimensions.
      • setDefaultCoordinateSystem

        public static void setDefaultCoordinateSystem​(CoordinateSystem3D system)
        Set the default coordinate system.
        Parameters:
        system - is the new default coordinate system.
        See Also:
        getDefaultCoordinateSystem()