Enum RotationConvention
- All Implemented Interfaces:
Serializable
,Comparable<RotationConvention>
,java.lang.constant.Constable
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionConstant for rotation that have the semantics of a frame conversion.Constant for rotation that have the semantics of a vector operator. -
Method Summary
Modifier and TypeMethodDescriptionstatic RotationConvention
Returns the enum constant of this type with the specified name.static RotationConvention[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
VECTOR_OPERATOR
Constant for rotation that have the semantics of a vector operator.According to this convention, the rotation moves vectors with respect to a fixed reference frame.
This means that if we define rotation r is a 90 degrees rotation around the Z axis, the image of vector
Vector3D.PLUS_I
would beVector3D.PLUS_J
, the image of vectorVector3D.PLUS_J
would beVector3D.MINUS_I
, the image of vectorVector3D.PLUS_K
would beVector3D.PLUS_K
, and the image of vector with coordinates (1, 2, 3) would be vector (-2, 1, 3). This means that the vector rotates counterclockwise.This convention was the only one supported by Hipparchus up to version 3.5.
The difference with
FRAME_TRANSFORM
is only the semantics of the sign of the angle. It is always possible to create or use a rotation using either convention to really represent a rotation that would have been best created or used with the other convention, by changing accordingly the sign of the rotation angle. This is how things were done up to version 3.5. -
FRAME_TRANSFORM
Constant for rotation that have the semantics of a frame conversion.According to this convention, the rotation considered vectors to be fixed, but their coordinates change as they are converted from an initial frame to a destination frame rotated with respect to the initial frame.
This means that if we define rotation r is a 90 degrees rotation around the Z axis, the image of vector
Vector3D.PLUS_I
would beVector3D.MINUS_J
, the image of vectorVector3D.PLUS_J
would beVector3D.PLUS_I
, the image of vectorVector3D.PLUS_K
would beVector3D.PLUS_K
, and the image of vector with coordinates (1, 2, 3) would be vector (2, -1, 3). This means that the coordinates of the vector rotates clockwise, because they are expressed with respect to a destination frame that is rotated counterclockwise.The difference with
VECTOR_OPERATOR
is only the semantics of the sign of the angle. It is always possible to create or use a rotation using either convention to really represent a rotation that would have been best created or used with the other convention, by changing accordingly the sign of the rotation angle. This is how things were done up to version 3.5.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-