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_HANDis for the coordinate system with front direction along+/-Xaxis, left direction along the+/-Yaxis and top direction along the+/-Zaxis 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,OYandOZare 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 fromOYtoOZ - when rotating around
OY, positive rotation angle is going fromOZtoOX - when rotating around
OZ, positive rotation angle is going fromOXtoOY
Left-handed rule: - axis cycle is:
OX>OY>OZ>OX>OY; - when rotating around
OX, positive rotation angle is going fromOYtoOZ - when rotating around
OY, positive rotation angle is going fromOZtoOX - when rotating around
OZ, positive rotation angle is going fromOXtoOY
- 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_HANDLeft handed XYZ coordinate system.XYZ_RIGHT_HANDRight handed XYZ coordinate system.XZY_LEFT_HANDLeft handed XZY coordinate system.XZY_RIGHT_HANDRight handed XZY coordinate system.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CoordinateSystem3DgetDefaultCoordinateSystem()Replies the preferred coordinate system.intgetDimensions()Replies the count of dimension in this space referential.booleanisLeftHanded()Replies if this coordinate system is a left-hand coordinate system.booleanisRightHanded()Replies if this coordinate system is a right-hand coordinate system.static voidsetDefaultCoordinateSystem(CoordinateSystem3D system)Set the default coordinate system.static CoordinateSystem3DvalueOf(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:
isRightHandedin interfaceCoordinateSystem- Returns:
trueif 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:
isLeftHandedin interfaceCoordinateSystem- Returns:
trueif 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:
getDimensionsin 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()
-
-
![[Left Handed XZY Coordinate System]](doc-files/xzy_left.png)
![[Left Handed XYZ Coordinate System]](doc-files/xyz_left.png)
![[Right Handed XZY Coordinate System]](doc-files/xzy_right.png)
![[Right Handed XYZ Coordinate System]](doc-files/xyz_right.png)