Enum CoordinateSystem3D
- java.lang.Object
-
- java.lang.Enum<CoordinateSystem3D>
-
- org.arakhne.afc.math.geometry.coordinatesystem.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
andOZ
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 fromOY
toOZ
- when rotating around
OY
, positive rotation angle is going fromOZ
toOX
- when rotating around
OZ
, positive rotation angle is going fromOX
toOY
Left-handed rule: - axis cycle is:
OX
>OY
>OZ
>OX
>OY
; - when rotating around
OX
, positive rotation angle is going fromOY
toOZ
- when rotating around
OY
, positive rotation angle is going fromOZ
toOX
- when rotating around
OZ
, positive rotation angle is going fromOX
toOY
- 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 Summary
Enum Constants Enum Constant Description XYZ_LEFT_HAND
Left handed XYZ coordinate system.XYZ_RIGHT_HAND
Right handed XYZ coordinate system.XZY_LEFT_HAND
Left handed XZY coordinate system.XZY_RIGHT_HAND
Right handed XZY coordinate system.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CoordinateSystem3D
getDefaultCoordinateSystem()
Replies the preferred coordinate system.int
getDimensions()
Replies the count of dimension in this space referential.boolean
isLeftHanded()
Replies if this coordinate system is a left-hand coordinate system.boolean
isRightHanded()
Replies if this coordinate system is a right-hand coordinate system.static void
setDefaultCoordinateSystem(CoordinateSystem3D system)
Set the default coordinate system.static CoordinateSystem3D
valueOf(String name)
Returns the enum constant of this type with the specified name.static CoordinateSystem3D[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface org.arakhne.afc.math.geometry.coordinatesystem.CoordinateSystem
name, ordinal
-
-
-
-
Enum Constant Detail
-
XZY_LEFT_HAND
public static final CoordinateSystem3D XZY_LEFT_HAND
-
XYZ_LEFT_HAND
public static final CoordinateSystem3D XYZ_LEFT_HAND
-
XZY_RIGHT_HAND
public static final CoordinateSystem3D XZY_RIGHT_HAND
-
XYZ_RIGHT_HAND
public static final CoordinateSystem3D XYZ_RIGHT_HAND
-
-
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 nameNullPointerException
- 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 interfaceCoordinateSystem
- Returns:
true
if this coordinate system is right-handed, otherwisefalse
-
isLeftHanded
@Pure public boolean isLeftHanded()
Replies if this coordinate system is a left-hand coordinate system..- Specified by:
isLeftHanded
in interfaceCoordinateSystem
- Returns:
true
if this coordinate system is left-handed, otherwisefalse
-
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 interfaceCoordinateSystem
- 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()
-
-