public enum RotationConvention extends Enum<RotationConvention>
Rotation
Enum Constant and Description |
---|
FRAME_TRANSFORM
Constant for rotation that have the semantics of a frame conversion.
|
VECTOR_OPERATOR
Constant for rotation that have the semantics of a vector operator.
|
Modifier and Type | Method and Description |
---|---|
static RotationConvention |
valueOf(String name)
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.
|
public static final RotationConvention 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 be
Vector3D.PLUS_J
, the image of vector Vector3D.PLUS_J
would be Vector3D.MINUS_I
, the image of vector Vector3D.PLUS_K
would be Vector3D.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 Apache Commons Math 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.
public static final RotationConvention FRAME_TRANSFORM
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 be
Vector3D.MINUS_J
, the image of vector Vector3D.PLUS_J
would be Vector3D.PLUS_I
, the image of vector Vector3D.PLUS_K
would be Vector3D.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.
public static RotationConvention[] values()
for (RotationConvention c : RotationConvention.values()) System.out.println(c);
public static RotationConvention valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2003–2016 The Apache Software Foundation. All rights reserved.