MATH-1284: Replace uses of "Vector3D" in comments and supporting files with "Cartesian3D".

This commit is contained in:
Ray DeCampo 2017-04-30 08:26:36 -04:00
parent e21d4d436b
commit a3984815eb
11 changed files with 121 additions and 121 deletions

View File

@ -81,9 +81,9 @@
<!-- The following equality test is intentional and needed for semantic purposes --> <!-- The following equality test is intentional and needed for semantic purposes -->
<Match> <Match>
<Or> <Or>
<Class name="org.apache.commons.math4.geometry.euclidean.oned.Vector1D" /> <Class name="org.apache.commons.math4.geometry.euclidean.oned.Cartesian1D" />
<Class name="org.apache.commons.math4.geometry.euclidean.twod.Vector2D" /> <Class name="org.apache.commons.math4.geometry.euclidean.twod.Cartesian2D" />
<Class name="org.apache.commons.math4.geometry.euclidean.threed.Vector3D" /> <Class name="org.apache.commons.math4.geometry.euclidean.threed.Cartesian3D" />
</Or> </Or>
<Method name="equals" params="java.lang.Object" returns="boolean" /> <Method name="equals" params="java.lang.Object" returns="boolean" />
<Bug pattern="FE_FLOATING_POINT_EQUALITY" /> <Bug pattern="FE_FLOATING_POINT_EQUALITY" />

View File

@ -196,7 +196,7 @@ public class Cartesian3D implements Serializable, Point<Euclidean3D>, Vector<Euc
/** Get the abscissa of the vector. /** Get the abscissa of the vector.
* @return abscissa of the vector * @return abscissa of the vector
* @see #Vector3D(double, double, double) * @see #Cartesian3D(double, double, double)
*/ */
public double getX() { public double getX() {
return x; return x;
@ -204,7 +204,7 @@ public class Cartesian3D implements Serializable, Point<Euclidean3D>, Vector<Euc
/** Get the ordinate of the vector. /** Get the ordinate of the vector.
* @return ordinate of the vector * @return ordinate of the vector
* @see #Vector3D(double, double, double) * @see #Cartesian3D(double, double, double)
*/ */
public double getY() { public double getY() {
return y; return y;
@ -212,7 +212,7 @@ public class Cartesian3D implements Serializable, Point<Euclidean3D>, Vector<Euc
/** Get the height of the vector. /** Get the height of the vector.
* @return height of the vector * @return height of the vector
* @see #Vector3D(double, double, double) * @see #Cartesian3D(double, double, double)
*/ */
public double getZ() { public double getZ() {
return z; return z;
@ -220,7 +220,7 @@ public class Cartesian3D implements Serializable, Point<Euclidean3D>, Vector<Euc
/** Get the vector coordinates as a dimension 3 array. /** Get the vector coordinates as a dimension 3 array.
* @return vector coordinates * @return vector coordinates
* @see #Vector3D(double[]) * @see #Cartesian3D(double[])
*/ */
public double[] toArray() { public double[] toArray() {
return new double[] { x, y, z }; return new double[] { x, y, z };
@ -266,7 +266,7 @@ public class Cartesian3D implements Serializable, Point<Euclidean3D>, Vector<Euc
/** Get the azimuth of the vector. /** Get the azimuth of the vector.
* @return azimuth (&alpha;) of the vector, between -&pi; and +&pi; * @return azimuth (&alpha;) of the vector, between -&pi; and +&pi;
* @see #Vector3D(double, double) * @see #Cartesian3D(double, double)
*/ */
public double getAlpha() { public double getAlpha() {
return FastMath.atan2(y, x); return FastMath.atan2(y, x);
@ -274,7 +274,7 @@ public class Cartesian3D implements Serializable, Point<Euclidean3D>, Vector<Euc
/** Get the elevation of the vector. /** Get the elevation of the vector.
* @return elevation (&delta;) of the vector, between -&pi;/2 and +&pi;/2 * @return elevation (&delta;) of the vector, between -&pi;/2 and +&pi;/2
* @see #Vector3D(double, double) * @see #Cartesian3D(double, double)
*/ */
public double getDelta() { public double getDelta() {
return FastMath.asin(z / getNorm()); return FastMath.asin(z / getNorm());
@ -324,9 +324,9 @@ public class Cartesian3D implements Serializable, Point<Euclidean3D>, Vector<Euc
* following example shows how to build a frame having the k axis * following example shows how to build a frame having the k axis
* aligned with the known vector u : * aligned with the known vector u :
* <pre><code> * <pre><code>
* Vector3D k = u.normalize(); * Cartesian3D k = u.normalize();
* Vector3D i = k.orthogonal(); * Cartesian3D i = k.orthogonal();
* Vector3D j = Vector3D.crossProduct(k, i); * Cartesian3D j = Cartesian3D.crossProduct(k, i);
* </code></pre></p> * </code></pre></p>
* @return a new normalized vector orthogonal to the instance * @return a new normalized vector orthogonal to the instance
* @exception MathArithmeticException if the norm of the instance is null * @exception MathArithmeticException if the norm of the instance is null
@ -423,8 +423,8 @@ public class Cartesian3D implements Serializable, Point<Euclidean3D>, Vector<Euc
* *
* @param other Object to test for equality to this * @param other Object to test for equality to this
* @return true if two 3D vector objects are equal, false if * @return true if two 3D vector objects are equal, false if
* object is null, not an instance of Vector3D, or * object is null, not an instance of Cartesian3D, or
* not equal to this Vector3D instance * not equal to this Cartesian3D instance
* *
*/ */
@Override @Override
@ -476,7 +476,7 @@ public class Cartesian3D implements Serializable, Point<Euclidean3D>, Vector<Euc
/** Compute the cross-product of the instance with another vector. /** Compute the cross-product of the instance with another vector.
* @param v other vector * @param v other vector
* @return the cross product this ^ v as a new Vector3D * @return the cross product this ^ v as a new Cartesian3D
*/ */
public Cartesian3D crossProduct(final Vector<Euclidean3D> v) { public Cartesian3D crossProduct(final Vector<Euclidean3D> v) {
final Cartesian3D v3 = (Cartesian3D) v; final Cartesian3D v3 = (Cartesian3D) v;

View File

@ -815,9 +815,9 @@ public class FieldRotation<T extends RealFieldElement<T>> implements Serializabl
} else { } else {
if (order == RotationOrder.XYZ) { if (order == RotationOrder.XYZ) {
// r (Vector3D.plusI) coordinates are : // r (Cartesian3D.plusI) coordinates are :
// cos (theta) cos (psi), -cos (theta) sin (psi), sin (theta) // cos (theta) cos (psi), -cos (theta) sin (psi), sin (theta)
// (-r) (Vector3D.plusK) coordinates are : // (-r) (Cartesian3D.plusK) coordinates are :
// sin (theta), -sin (phi) cos (theta), cos (phi) cos (theta) // sin (theta), -sin (phi) cos (theta), cos (phi) cos (theta)
// and we can choose to have theta in the interval [-PI/2 ; +PI/2] // and we can choose to have theta in the interval [-PI/2 ; +PI/2]
FieldVector3D<T> v1 = applyTo(Cartesian3D.PLUS_I); FieldVector3D<T> v1 = applyTo(Cartesian3D.PLUS_I);
@ -831,9 +831,9 @@ public class FieldRotation<T extends RealFieldElement<T>> implements Serializabl
} else if (order == RotationOrder.XZY) { } else if (order == RotationOrder.XZY) {
// r (Vector3D.plusI) coordinates are : // r (Cartesian3D.plusI) coordinates are :
// cos (psi) cos (theta), -sin (psi), cos (psi) sin (theta) // cos (psi) cos (theta), -sin (psi), cos (psi) sin (theta)
// (-r) (Vector3D.plusJ) coordinates are : // (-r) (Cartesian3D.plusJ) coordinates are :
// -sin (psi), cos (phi) cos (psi), sin (phi) cos (psi) // -sin (psi), cos (phi) cos (psi), sin (phi) cos (psi)
// and we can choose to have psi in the interval [-PI/2 ; +PI/2] // and we can choose to have psi in the interval [-PI/2 ; +PI/2]
FieldVector3D<T> v1 = applyTo(Cartesian3D.PLUS_I); FieldVector3D<T> v1 = applyTo(Cartesian3D.PLUS_I);
@ -847,9 +847,9 @@ public class FieldRotation<T extends RealFieldElement<T>> implements Serializabl
} else if (order == RotationOrder.YXZ) { } else if (order == RotationOrder.YXZ) {
// r (Vector3D.plusJ) coordinates are : // r (Cartesian3D.plusJ) coordinates are :
// cos (phi) sin (psi), cos (phi) cos (psi), -sin (phi) // cos (phi) sin (psi), cos (phi) cos (psi), -sin (phi)
// (-r) (Vector3D.plusK) coordinates are : // (-r) (Cartesian3D.plusK) coordinates are :
// sin (theta) cos (phi), -sin (phi), cos (theta) cos (phi) // sin (theta) cos (phi), -sin (phi), cos (theta) cos (phi)
// and we can choose to have phi in the interval [-PI/2 ; +PI/2] // and we can choose to have phi in the interval [-PI/2 ; +PI/2]
FieldVector3D<T> v1 = applyTo(Cartesian3D.PLUS_J); FieldVector3D<T> v1 = applyTo(Cartesian3D.PLUS_J);
@ -863,9 +863,9 @@ public class FieldRotation<T extends RealFieldElement<T>> implements Serializabl
} else if (order == RotationOrder.YZX) { } else if (order == RotationOrder.YZX) {
// r (Vector3D.plusJ) coordinates are : // r (Cartesian3D.plusJ) coordinates are :
// sin (psi), cos (psi) cos (phi), -cos (psi) sin (phi) // sin (psi), cos (psi) cos (phi), -cos (psi) sin (phi)
// (-r) (Vector3D.plusI) coordinates are : // (-r) (Cartesian3D.plusI) coordinates are :
// cos (theta) cos (psi), sin (psi), -sin (theta) cos (psi) // cos (theta) cos (psi), sin (psi), -sin (theta) cos (psi)
// and we can choose to have psi in the interval [-PI/2 ; +PI/2] // and we can choose to have psi in the interval [-PI/2 ; +PI/2]
FieldVector3D<T> v1 = applyTo(Cartesian3D.PLUS_J); FieldVector3D<T> v1 = applyTo(Cartesian3D.PLUS_J);
@ -879,9 +879,9 @@ public class FieldRotation<T extends RealFieldElement<T>> implements Serializabl
} else if (order == RotationOrder.ZXY) { } else if (order == RotationOrder.ZXY) {
// r (Vector3D.plusK) coordinates are : // r (Cartesian3D.plusK) coordinates are :
// -cos (phi) sin (theta), sin (phi), cos (phi) cos (theta) // -cos (phi) sin (theta), sin (phi), cos (phi) cos (theta)
// (-r) (Vector3D.plusJ) coordinates are : // (-r) (Cartesian3D.plusJ) coordinates are :
// -sin (psi) cos (phi), cos (psi) cos (phi), sin (phi) // -sin (psi) cos (phi), cos (psi) cos (phi), sin (phi)
// and we can choose to have phi in the interval [-PI/2 ; +PI/2] // and we can choose to have phi in the interval [-PI/2 ; +PI/2]
FieldVector3D<T> v1 = applyTo(Cartesian3D.PLUS_K); FieldVector3D<T> v1 = applyTo(Cartesian3D.PLUS_K);
@ -895,9 +895,9 @@ public class FieldRotation<T extends RealFieldElement<T>> implements Serializabl
} else if (order == RotationOrder.ZYX) { } else if (order == RotationOrder.ZYX) {
// r (Vector3D.plusK) coordinates are : // r (Cartesian3D.plusK) coordinates are :
// -sin (theta), cos (theta) sin (phi), cos (theta) cos (phi) // -sin (theta), cos (theta) sin (phi), cos (theta) cos (phi)
// (-r) (Vector3D.plusI) coordinates are : // (-r) (Cartesian3D.plusI) coordinates are :
// cos (psi) cos (theta), sin (psi) cos (theta), -sin (theta) // cos (psi) cos (theta), sin (psi) cos (theta), -sin (theta)
// and we can choose to have theta in the interval [-PI/2 ; +PI/2] // and we can choose to have theta in the interval [-PI/2 ; +PI/2]
FieldVector3D<T> v1 = applyTo(Cartesian3D.PLUS_K); FieldVector3D<T> v1 = applyTo(Cartesian3D.PLUS_K);
@ -911,9 +911,9 @@ public class FieldRotation<T extends RealFieldElement<T>> implements Serializabl
} else if (order == RotationOrder.XYX) { } else if (order == RotationOrder.XYX) {
// r (Vector3D.plusI) coordinates are : // r (Cartesian3D.plusI) coordinates are :
// cos (theta), sin (phi2) sin (theta), cos (phi2) sin (theta) // cos (theta), sin (phi2) sin (theta), cos (phi2) sin (theta)
// (-r) (Vector3D.plusI) coordinates are : // (-r) (Cartesian3D.plusI) coordinates are :
// cos (theta), sin (theta) sin (phi1), -sin (theta) cos (phi1) // cos (theta), sin (theta) sin (phi1), -sin (theta) cos (phi1)
// and we can choose to have theta in the interval [0 ; PI] // and we can choose to have theta in the interval [0 ; PI]
FieldVector3D<T> v1 = applyTo(Cartesian3D.PLUS_I); FieldVector3D<T> v1 = applyTo(Cartesian3D.PLUS_I);
@ -927,9 +927,9 @@ public class FieldRotation<T extends RealFieldElement<T>> implements Serializabl
} else if (order == RotationOrder.XZX) { } else if (order == RotationOrder.XZX) {
// r (Vector3D.plusI) coordinates are : // r (Cartesian3D.plusI) coordinates are :
// cos (psi), -cos (phi2) sin (psi), sin (phi2) sin (psi) // cos (psi), -cos (phi2) sin (psi), sin (phi2) sin (psi)
// (-r) (Vector3D.plusI) coordinates are : // (-r) (Cartesian3D.plusI) coordinates are :
// cos (psi), sin (psi) cos (phi1), sin (psi) sin (phi1) // cos (psi), sin (psi) cos (phi1), sin (psi) sin (phi1)
// and we can choose to have psi in the interval [0 ; PI] // and we can choose to have psi in the interval [0 ; PI]
FieldVector3D<T> v1 = applyTo(Cartesian3D.PLUS_I); FieldVector3D<T> v1 = applyTo(Cartesian3D.PLUS_I);
@ -943,9 +943,9 @@ public class FieldRotation<T extends RealFieldElement<T>> implements Serializabl
} else if (order == RotationOrder.YXY) { } else if (order == RotationOrder.YXY) {
// r (Vector3D.plusJ) coordinates are : // r (Cartesian3D.plusJ) coordinates are :
// sin (phi) sin (theta2), cos (phi), -sin (phi) cos (theta2) // sin (phi) sin (theta2), cos (phi), -sin (phi) cos (theta2)
// (-r) (Vector3D.plusJ) coordinates are : // (-r) (Cartesian3D.plusJ) coordinates are :
// sin (theta1) sin (phi), cos (phi), cos (theta1) sin (phi) // sin (theta1) sin (phi), cos (phi), cos (theta1) sin (phi)
// and we can choose to have phi in the interval [0 ; PI] // and we can choose to have phi in the interval [0 ; PI]
FieldVector3D<T> v1 = applyTo(Cartesian3D.PLUS_J); FieldVector3D<T> v1 = applyTo(Cartesian3D.PLUS_J);
@ -959,9 +959,9 @@ public class FieldRotation<T extends RealFieldElement<T>> implements Serializabl
} else if (order == RotationOrder.YZY) { } else if (order == RotationOrder.YZY) {
// r (Vector3D.plusJ) coordinates are : // r (Cartesian3D.plusJ) coordinates are :
// sin (psi) cos (theta2), cos (psi), sin (psi) sin (theta2) // sin (psi) cos (theta2), cos (psi), sin (psi) sin (theta2)
// (-r) (Vector3D.plusJ) coordinates are : // (-r) (Cartesian3D.plusJ) coordinates are :
// -cos (theta1) sin (psi), cos (psi), sin (theta1) sin (psi) // -cos (theta1) sin (psi), cos (psi), sin (theta1) sin (psi)
// and we can choose to have psi in the interval [0 ; PI] // and we can choose to have psi in the interval [0 ; PI]
FieldVector3D<T> v1 = applyTo(Cartesian3D.PLUS_J); FieldVector3D<T> v1 = applyTo(Cartesian3D.PLUS_J);
@ -975,9 +975,9 @@ public class FieldRotation<T extends RealFieldElement<T>> implements Serializabl
} else if (order == RotationOrder.ZXZ) { } else if (order == RotationOrder.ZXZ) {
// r (Vector3D.plusK) coordinates are : // r (Cartesian3D.plusK) coordinates are :
// sin (phi) sin (psi2), sin (phi) cos (psi2), cos (phi) // sin (phi) sin (psi2), sin (phi) cos (psi2), cos (phi)
// (-r) (Vector3D.plusK) coordinates are : // (-r) (Cartesian3D.plusK) coordinates are :
// sin (psi1) sin (phi), -cos (psi1) sin (phi), cos (phi) // sin (psi1) sin (phi), -cos (psi1) sin (phi), cos (phi)
// and we can choose to have phi in the interval [0 ; PI] // and we can choose to have phi in the interval [0 ; PI]
FieldVector3D<T> v1 = applyTo(Cartesian3D.PLUS_K); FieldVector3D<T> v1 = applyTo(Cartesian3D.PLUS_K);
@ -991,9 +991,9 @@ public class FieldRotation<T extends RealFieldElement<T>> implements Serializabl
} else { // last possibility is ZYZ } else { // last possibility is ZYZ
// r (Vector3D.plusK) coordinates are : // r (Cartesian3D.plusK) coordinates are :
// -sin (theta) cos (psi2), sin (theta) sin (psi2), cos (theta) // -sin (theta) cos (psi2), sin (theta) sin (psi2), cos (theta)
// (-r) (Vector3D.plusK) coordinates are : // (-r) (Cartesian3D.plusK) coordinates are :
// cos (psi1) sin (theta), sin (psi1) sin (theta), cos (theta) // cos (psi1) sin (theta), sin (psi1) sin (theta), cos (theta)
// and we can choose to have theta in the interval [0 ; PI] // and we can choose to have theta in the interval [0 ; PI]
FieldVector3D<T> v1 = applyTo(Cartesian3D.PLUS_K); FieldVector3D<T> v1 = applyTo(Cartesian3D.PLUS_K);

View File

@ -535,9 +535,9 @@ public class FieldVector3D<T extends RealFieldElement<T>> implements Serializabl
* following example shows how to build a frame having the k axis * following example shows how to build a frame having the k axis
* aligned with the known vector u : * aligned with the known vector u :
* <pre><code> * <pre><code>
* Vector3D k = u.normalize(); * Cartesian3D k = u.normalize();
* Vector3D i = k.orthogonal(); * Cartesian3D i = k.orthogonal();
* Vector3D j = Vector3D.crossProduct(k, i); * Cartesian3D j = Cartesian3D.crossProduct(k, i);
* </code></pre></p> * </code></pre></p>
* @return a new normalized vector orthogonal to the instance * @return a new normalized vector orthogonal to the instance
* @exception MathArithmeticException if the norm of the instance is null * @exception MathArithmeticException if the norm of the instance is null
@ -707,8 +707,8 @@ public class FieldVector3D<T extends RealFieldElement<T>> implements Serializabl
* *
* @param other Object to test for equality to this * @param other Object to test for equality to this
* @return true if two 3D vector objects are equal, false if * @return true if two 3D vector objects are equal, false if
* object is null, not an instance of Vector3D, or * object is null, not an instance of FieldVector3D, or
* not equal to this Vector3D instance * not equal to this FieldVector3D instance
* *
*/ */
@Override @Override
@ -776,7 +776,7 @@ public class FieldVector3D<T extends RealFieldElement<T>> implements Serializabl
/** Compute the cross-product of the instance with another vector. /** Compute the cross-product of the instance with another vector.
* @param v other vector * @param v other vector
* @return the cross product this ^ v as a new Vector3D * @return the cross product this ^ v as a new FieldVector3D
*/ */
public FieldVector3D<T> crossProduct(final FieldVector3D<T> v) { public FieldVector3D<T> crossProduct(final FieldVector3D<T> v) {
return new FieldVector3D<>(x.linearCombination(y, v.z, z.negate(), v.y), return new FieldVector3D<>(x.linearCombination(y, v.z, z.negate(), v.y),
@ -786,7 +786,7 @@ public class FieldVector3D<T extends RealFieldElement<T>> implements Serializabl
/** Compute the cross-product of the instance with another vector. /** Compute the cross-product of the instance with another vector.
* @param v other vector * @param v other vector
* @return the cross product this ^ v as a new Vector3D * @return the cross product this ^ v as a new FieldVector3D
*/ */
public FieldVector3D<T> crossProduct(final Cartesian3D v) { public FieldVector3D<T> crossProduct(final Cartesian3D v) {
return new FieldVector3D<>(x.linearCombination(v.getZ(), y, -v.getY(), z), return new FieldVector3D<>(x.linearCombination(v.getZ(), y, -v.getY(), z),

View File

@ -72,8 +72,8 @@ import org.apache.commons.math4.util.MathArrays;
* class does not push the user towards one specific definition and hence does not * class does not push the user towards one specific definition and hence does not
* provide methods like <code>projectVectorIntoDestinationFrame</code> or * provide methods like <code>projectVectorIntoDestinationFrame</code> or
* <code>computeTransformedDirection</code>. It provides simpler and more generic * <code>computeTransformedDirection</code>. It provides simpler and more generic
* methods: {@link #applyTo(Vector3D) applyTo(Vector3D)} and {@link * methods: {@link #applyTo(Cartesian3D) applyTo(Cartesian3D)} and {@link
* #applyInverseTo(Vector3D) applyInverseTo(Vector3D)}.</p> * #applyInverseTo(Cartesian3D) applyInverseTo(Cartesian3D)}.</p>
* *
* <p>Since a rotation is basically a vectorial operator, several rotations can be * <p>Since a rotation is basically a vectorial operator, several rotations can be
* composed together and the composite operation <code>r = r<sub>1</sub> o * composed together and the composite operation <code>r = r<sub>1</sub> o
@ -153,13 +153,13 @@ public class Rotation implements Serializable {
/** Build a rotation from an axis and an angle. /** Build a rotation from an axis and an angle.
* <p> * <p>
* Calling this constructor is equivalent to call * Calling this constructor is equivalent to call
* {@link #Rotation(Vector3D, double, RotationConvention) * {@link #Rotation(Cartesian3D, double, RotationConvention)
* new Rotation(axis, angle, RotationConvention.VECTOR_OPERATOR)} * new Rotation(axis, angle, RotationConvention.VECTOR_OPERATOR)}
* </p> * </p>
* @param axis axis around which to rotate * @param axis axis around which to rotate
* @param angle rotation angle. * @param angle rotation angle.
* @exception MathIllegalArgumentException if the axis norm is zero * @exception MathIllegalArgumentException if the axis norm is zero
* @deprecated as of 3.6, replaced with {@link #Rotation(Vector3D, double, RotationConvention)} * @deprecated as of 3.6, replaced with {@link #Rotation(Cartesian3D, double, RotationConvention)}
*/ */
@Deprecated @Deprecated
public Rotation(Cartesian3D axis, double angle) throws MathIllegalArgumentException { public Rotation(Cartesian3D axis, double angle) throws MathIllegalArgumentException {
@ -518,7 +518,7 @@ public class Rotation implements Serializable {
* {@link #getAxis(RotationConvention) getAxis(RotationConvention.VECTOR_OPERATOR)} * {@link #getAxis(RotationConvention) getAxis(RotationConvention.VECTOR_OPERATOR)}
* </p> * </p>
* @return normalized axis of the rotation * @return normalized axis of the rotation
* @see #Rotation(Vector3D, double, RotationConvention) * @see #Rotation(Cartesian3D, double, RotationConvention)
* @deprecated as of 3.6, replaced with {@link #getAxis(RotationConvention)} * @deprecated as of 3.6, replaced with {@link #getAxis(RotationConvention)}
*/ */
@Deprecated @Deprecated
@ -534,7 +534,7 @@ public class Rotation implements Serializable {
* </p> * </p>
* @param convention convention to use for the semantics of the angle * @param convention convention to use for the semantics of the angle
* @return normalized axis of the rotation * @return normalized axis of the rotation
* @see #Rotation(Vector3D, double, RotationConvention) * @see #Rotation(Cartesian3D, double, RotationConvention)
* @since 3.6 * @since 3.6
*/ */
public Cartesian3D getAxis(final RotationConvention convention) { public Cartesian3D getAxis(final RotationConvention convention) {
@ -554,7 +554,7 @@ public class Rotation implements Serializable {
/** Get the angle of the rotation. /** Get the angle of the rotation.
* @return angle of the rotation (between 0 and &pi;) * @return angle of the rotation (between 0 and &pi;)
* @see #Rotation(Vector3D, double) * @see #Rotation(Cartesian3D, double)
*/ */
public double getAngle() { public double getAngle() {
if ((q0 < -0.1) || (q0 > 0.1)) { if ((q0 < -0.1) || (q0 > 0.1)) {
@ -628,9 +628,9 @@ public class Rotation implements Serializable {
if (convention == RotationConvention.VECTOR_OPERATOR) { if (convention == RotationConvention.VECTOR_OPERATOR) {
if (order == RotationOrder.XYZ) { if (order == RotationOrder.XYZ) {
// r (Vector3D.plusK) coordinates are : // r (Cartesian3D.plusK) coordinates are :
// sin (theta), -cos (theta) sin (phi), cos (theta) cos (phi) // sin (theta), -cos (theta) sin (phi), cos (theta) cos (phi)
// (-r) (Vector3D.plusI) coordinates are : // (-r) (Cartesian3D.plusI) coordinates are :
// cos (psi) cos (theta), -sin (psi) cos (theta), sin (theta) // cos (psi) cos (theta), -sin (psi) cos (theta), sin (theta)
// and we can choose to have theta in the interval [-PI/2 ; +PI/2] // and we can choose to have theta in the interval [-PI/2 ; +PI/2]
Cartesian3D v1 = applyTo(Cartesian3D.PLUS_K); Cartesian3D v1 = applyTo(Cartesian3D.PLUS_K);
@ -646,9 +646,9 @@ public class Rotation implements Serializable {
} else if (order == RotationOrder.XZY) { } else if (order == RotationOrder.XZY) {
// r (Vector3D.plusJ) coordinates are : // r (Cartesian3D.plusJ) coordinates are :
// -sin (psi), cos (psi) cos (phi), cos (psi) sin (phi) // -sin (psi), cos (psi) cos (phi), cos (psi) sin (phi)
// (-r) (Vector3D.plusI) coordinates are : // (-r) (Cartesian3D.plusI) coordinates are :
// cos (theta) cos (psi), -sin (psi), sin (theta) cos (psi) // cos (theta) cos (psi), -sin (psi), sin (theta) cos (psi)
// and we can choose to have psi in the interval [-PI/2 ; +PI/2] // and we can choose to have psi in the interval [-PI/2 ; +PI/2]
Cartesian3D v1 = applyTo(Cartesian3D.PLUS_J); Cartesian3D v1 = applyTo(Cartesian3D.PLUS_J);
@ -664,9 +664,9 @@ public class Rotation implements Serializable {
} else if (order == RotationOrder.YXZ) { } else if (order == RotationOrder.YXZ) {
// r (Vector3D.plusK) coordinates are : // r (Cartesian3D.plusK) coordinates are :
// cos (phi) sin (theta), -sin (phi), cos (phi) cos (theta) // cos (phi) sin (theta), -sin (phi), cos (phi) cos (theta)
// (-r) (Vector3D.plusJ) coordinates are : // (-r) (Cartesian3D.plusJ) coordinates are :
// sin (psi) cos (phi), cos (psi) cos (phi), -sin (phi) // sin (psi) cos (phi), cos (psi) cos (phi), -sin (phi)
// and we can choose to have phi in the interval [-PI/2 ; +PI/2] // and we can choose to have phi in the interval [-PI/2 ; +PI/2]
Cartesian3D v1 = applyTo(Cartesian3D.PLUS_K); Cartesian3D v1 = applyTo(Cartesian3D.PLUS_K);
@ -682,9 +682,9 @@ public class Rotation implements Serializable {
} else if (order == RotationOrder.YZX) { } else if (order == RotationOrder.YZX) {
// r (Vector3D.plusI) coordinates are : // r (Cartesian3D.plusI) coordinates are :
// cos (psi) cos (theta), sin (psi), -cos (psi) sin (theta) // cos (psi) cos (theta), sin (psi), -cos (psi) sin (theta)
// (-r) (Vector3D.plusJ) coordinates are : // (-r) (Cartesian3D.plusJ) coordinates are :
// sin (psi), cos (phi) cos (psi), -sin (phi) cos (psi) // sin (psi), cos (phi) cos (psi), -sin (phi) cos (psi)
// and we can choose to have psi in the interval [-PI/2 ; +PI/2] // and we can choose to have psi in the interval [-PI/2 ; +PI/2]
Cartesian3D v1 = applyTo(Cartesian3D.PLUS_I); Cartesian3D v1 = applyTo(Cartesian3D.PLUS_I);
@ -700,9 +700,9 @@ public class Rotation implements Serializable {
} else if (order == RotationOrder.ZXY) { } else if (order == RotationOrder.ZXY) {
// r (Vector3D.plusJ) coordinates are : // r (Cartesian3D.plusJ) coordinates are :
// -cos (phi) sin (psi), cos (phi) cos (psi), sin (phi) // -cos (phi) sin (psi), cos (phi) cos (psi), sin (phi)
// (-r) (Vector3D.plusK) coordinates are : // (-r) (Cartesian3D.plusK) coordinates are :
// -sin (theta) cos (phi), sin (phi), cos (theta) cos (phi) // -sin (theta) cos (phi), sin (phi), cos (theta) cos (phi)
// and we can choose to have phi in the interval [-PI/2 ; +PI/2] // and we can choose to have phi in the interval [-PI/2 ; +PI/2]
Cartesian3D v1 = applyTo(Cartesian3D.PLUS_J); Cartesian3D v1 = applyTo(Cartesian3D.PLUS_J);
@ -718,9 +718,9 @@ public class Rotation implements Serializable {
} else if (order == RotationOrder.ZYX) { } else if (order == RotationOrder.ZYX) {
// r (Vector3D.plusI) coordinates are : // r (Cartesian3D.plusI) coordinates are :
// cos (theta) cos (psi), cos (theta) sin (psi), -sin (theta) // cos (theta) cos (psi), cos (theta) sin (psi), -sin (theta)
// (-r) (Vector3D.plusK) coordinates are : // (-r) (Cartesian3D.plusK) coordinates are :
// -sin (theta), sin (phi) cos (theta), cos (phi) cos (theta) // -sin (theta), sin (phi) cos (theta), cos (phi) cos (theta)
// and we can choose to have theta in the interval [-PI/2 ; +PI/2] // and we can choose to have theta in the interval [-PI/2 ; +PI/2]
Cartesian3D v1 = applyTo(Cartesian3D.PLUS_I); Cartesian3D v1 = applyTo(Cartesian3D.PLUS_I);
@ -736,9 +736,9 @@ public class Rotation implements Serializable {
} else if (order == RotationOrder.XYX) { } else if (order == RotationOrder.XYX) {
// r (Vector3D.plusI) coordinates are : // r (Cartesian3D.plusI) coordinates are :
// cos (theta), sin (phi1) sin (theta), -cos (phi1) sin (theta) // cos (theta), sin (phi1) sin (theta), -cos (phi1) sin (theta)
// (-r) (Vector3D.plusI) coordinates are : // (-r) (Cartesian3D.plusI) coordinates are :
// cos (theta), sin (theta) sin (phi2), sin (theta) cos (phi2) // cos (theta), sin (theta) sin (phi2), sin (theta) cos (phi2)
// and we can choose to have theta in the interval [0 ; PI] // and we can choose to have theta in the interval [0 ; PI]
Cartesian3D v1 = applyTo(Cartesian3D.PLUS_I); Cartesian3D v1 = applyTo(Cartesian3D.PLUS_I);
@ -754,9 +754,9 @@ public class Rotation implements Serializable {
} else if (order == RotationOrder.XZX) { } else if (order == RotationOrder.XZX) {
// r (Vector3D.plusI) coordinates are : // r (Cartesian3D.plusI) coordinates are :
// cos (psi), cos (phi1) sin (psi), sin (phi1) sin (psi) // cos (psi), cos (phi1) sin (psi), sin (phi1) sin (psi)
// (-r) (Vector3D.plusI) coordinates are : // (-r) (Cartesian3D.plusI) coordinates are :
// cos (psi), -sin (psi) cos (phi2), sin (psi) sin (phi2) // cos (psi), -sin (psi) cos (phi2), sin (psi) sin (phi2)
// and we can choose to have psi in the interval [0 ; PI] // and we can choose to have psi in the interval [0 ; PI]
Cartesian3D v1 = applyTo(Cartesian3D.PLUS_I); Cartesian3D v1 = applyTo(Cartesian3D.PLUS_I);
@ -772,9 +772,9 @@ public class Rotation implements Serializable {
} else if (order == RotationOrder.YXY) { } else if (order == RotationOrder.YXY) {
// r (Vector3D.plusJ) coordinates are : // r (Cartesian3D.plusJ) coordinates are :
// sin (theta1) sin (phi), cos (phi), cos (theta1) sin (phi) // sin (theta1) sin (phi), cos (phi), cos (theta1) sin (phi)
// (-r) (Vector3D.plusJ) coordinates are : // (-r) (Cartesian3D.plusJ) coordinates are :
// sin (phi) sin (theta2), cos (phi), -sin (phi) cos (theta2) // sin (phi) sin (theta2), cos (phi), -sin (phi) cos (theta2)
// and we can choose to have phi in the interval [0 ; PI] // and we can choose to have phi in the interval [0 ; PI]
Cartesian3D v1 = applyTo(Cartesian3D.PLUS_J); Cartesian3D v1 = applyTo(Cartesian3D.PLUS_J);
@ -790,9 +790,9 @@ public class Rotation implements Serializable {
} else if (order == RotationOrder.YZY) { } else if (order == RotationOrder.YZY) {
// r (Vector3D.plusJ) coordinates are : // r (Cartesian3D.plusJ) coordinates are :
// -cos (theta1) sin (psi), cos (psi), sin (theta1) sin (psi) // -cos (theta1) sin (psi), cos (psi), sin (theta1) sin (psi)
// (-r) (Vector3D.plusJ) coordinates are : // (-r) (Cartesian3D.plusJ) coordinates are :
// sin (psi) cos (theta2), cos (psi), sin (psi) sin (theta2) // sin (psi) cos (theta2), cos (psi), sin (psi) sin (theta2)
// and we can choose to have psi in the interval [0 ; PI] // and we can choose to have psi in the interval [0 ; PI]
Cartesian3D v1 = applyTo(Cartesian3D.PLUS_J); Cartesian3D v1 = applyTo(Cartesian3D.PLUS_J);
@ -808,9 +808,9 @@ public class Rotation implements Serializable {
} else if (order == RotationOrder.ZXZ) { } else if (order == RotationOrder.ZXZ) {
// r (Vector3D.plusK) coordinates are : // r (Cartesian3D.plusK) coordinates are :
// sin (psi1) sin (phi), -cos (psi1) sin (phi), cos (phi) // sin (psi1) sin (phi), -cos (psi1) sin (phi), cos (phi)
// (-r) (Vector3D.plusK) coordinates are : // (-r) (Cartesian3D.plusK) coordinates are :
// sin (phi) sin (psi2), sin (phi) cos (psi2), cos (phi) // sin (phi) sin (psi2), sin (phi) cos (psi2), cos (phi)
// and we can choose to have phi in the interval [0 ; PI] // and we can choose to have phi in the interval [0 ; PI]
Cartesian3D v1 = applyTo(Cartesian3D.PLUS_K); Cartesian3D v1 = applyTo(Cartesian3D.PLUS_K);
@ -826,9 +826,9 @@ public class Rotation implements Serializable {
} else { // last possibility is ZYZ } else { // last possibility is ZYZ
// r (Vector3D.plusK) coordinates are : // r (Cartesian3D.plusK) coordinates are :
// cos (psi1) sin (theta), sin (psi1) sin (theta), cos (theta) // cos (psi1) sin (theta), sin (psi1) sin (theta), cos (theta)
// (-r) (Vector3D.plusK) coordinates are : // (-r) (Cartesian3D.plusK) coordinates are :
// -sin (theta) cos (psi2), sin (theta) sin (psi2), cos (theta) // -sin (theta) cos (psi2), sin (theta) sin (psi2), cos (theta)
// and we can choose to have theta in the interval [0 ; PI] // and we can choose to have theta in the interval [0 ; PI]
Cartesian3D v1 = applyTo(Cartesian3D.PLUS_K); Cartesian3D v1 = applyTo(Cartesian3D.PLUS_K);
@ -846,9 +846,9 @@ public class Rotation implements Serializable {
} else { } else {
if (order == RotationOrder.XYZ) { if (order == RotationOrder.XYZ) {
// r (Vector3D.plusI) coordinates are : // r (Cartesian3D.plusI) coordinates are :
// cos (theta) cos (psi), -cos (theta) sin (psi), sin (theta) // cos (theta) cos (psi), -cos (theta) sin (psi), sin (theta)
// (-r) (Vector3D.plusK) coordinates are : // (-r) (Cartesian3D.plusK) coordinates are :
// sin (theta), -sin (phi) cos (theta), cos (phi) cos (theta) // sin (theta), -sin (phi) cos (theta), cos (phi) cos (theta)
// and we can choose to have theta in the interval [-PI/2 ; +PI/2] // and we can choose to have theta in the interval [-PI/2 ; +PI/2]
Cartesian3D v1 = applyTo(Cartesian3D.PLUS_I); Cartesian3D v1 = applyTo(Cartesian3D.PLUS_I);
@ -864,9 +864,9 @@ public class Rotation implements Serializable {
} else if (order == RotationOrder.XZY) { } else if (order == RotationOrder.XZY) {
// r (Vector3D.plusI) coordinates are : // r (Cartesian3D.plusI) coordinates are :
// cos (psi) cos (theta), -sin (psi), cos (psi) sin (theta) // cos (psi) cos (theta), -sin (psi), cos (psi) sin (theta)
// (-r) (Vector3D.plusJ) coordinates are : // (-r) (Cartesian3D.plusJ) coordinates are :
// -sin (psi), cos (phi) cos (psi), sin (phi) cos (psi) // -sin (psi), cos (phi) cos (psi), sin (phi) cos (psi)
// and we can choose to have psi in the interval [-PI/2 ; +PI/2] // and we can choose to have psi in the interval [-PI/2 ; +PI/2]
Cartesian3D v1 = applyTo(Cartesian3D.PLUS_I); Cartesian3D v1 = applyTo(Cartesian3D.PLUS_I);
@ -882,9 +882,9 @@ public class Rotation implements Serializable {
} else if (order == RotationOrder.YXZ) { } else if (order == RotationOrder.YXZ) {
// r (Vector3D.plusJ) coordinates are : // r (Cartesian3D.plusJ) coordinates are :
// cos (phi) sin (psi), cos (phi) cos (psi), -sin (phi) // cos (phi) sin (psi), cos (phi) cos (psi), -sin (phi)
// (-r) (Vector3D.plusK) coordinates are : // (-r) (Cartesian3D.plusK) coordinates are :
// sin (theta) cos (phi), -sin (phi), cos (theta) cos (phi) // sin (theta) cos (phi), -sin (phi), cos (theta) cos (phi)
// and we can choose to have phi in the interval [-PI/2 ; +PI/2] // and we can choose to have phi in the interval [-PI/2 ; +PI/2]
Cartesian3D v1 = applyTo(Cartesian3D.PLUS_J); Cartesian3D v1 = applyTo(Cartesian3D.PLUS_J);
@ -900,9 +900,9 @@ public class Rotation implements Serializable {
} else if (order == RotationOrder.YZX) { } else if (order == RotationOrder.YZX) {
// r (Vector3D.plusJ) coordinates are : // r (Cartesian3D.plusJ) coordinates are :
// sin (psi), cos (psi) cos (phi), -cos (psi) sin (phi) // sin (psi), cos (psi) cos (phi), -cos (psi) sin (phi)
// (-r) (Vector3D.plusI) coordinates are : // (-r) (Cartesian3D.plusI) coordinates are :
// cos (theta) cos (psi), sin (psi), -sin (theta) cos (psi) // cos (theta) cos (psi), sin (psi), -sin (theta) cos (psi)
// and we can choose to have psi in the interval [-PI/2 ; +PI/2] // and we can choose to have psi in the interval [-PI/2 ; +PI/2]
Cartesian3D v1 = applyTo(Cartesian3D.PLUS_J); Cartesian3D v1 = applyTo(Cartesian3D.PLUS_J);
@ -918,9 +918,9 @@ public class Rotation implements Serializable {
} else if (order == RotationOrder.ZXY) { } else if (order == RotationOrder.ZXY) {
// r (Vector3D.plusK) coordinates are : // r (Cartesian3D.plusK) coordinates are :
// -cos (phi) sin (theta), sin (phi), cos (phi) cos (theta) // -cos (phi) sin (theta), sin (phi), cos (phi) cos (theta)
// (-r) (Vector3D.plusJ) coordinates are : // (-r) (Cartesian3D.plusJ) coordinates are :
// -sin (psi) cos (phi), cos (psi) cos (phi), sin (phi) // -sin (psi) cos (phi), cos (psi) cos (phi), sin (phi)
// and we can choose to have phi in the interval [-PI/2 ; +PI/2] // and we can choose to have phi in the interval [-PI/2 ; +PI/2]
Cartesian3D v1 = applyTo(Cartesian3D.PLUS_K); Cartesian3D v1 = applyTo(Cartesian3D.PLUS_K);
@ -936,9 +936,9 @@ public class Rotation implements Serializable {
} else if (order == RotationOrder.ZYX) { } else if (order == RotationOrder.ZYX) {
// r (Vector3D.plusK) coordinates are : // r (Cartesian3D.plusK) coordinates are :
// -sin (theta), cos (theta) sin (phi), cos (theta) cos (phi) // -sin (theta), cos (theta) sin (phi), cos (theta) cos (phi)
// (-r) (Vector3D.plusI) coordinates are : // (-r) (Cartesian3D.plusI) coordinates are :
// cos (psi) cos (theta), sin (psi) cos (theta), -sin (theta) // cos (psi) cos (theta), sin (psi) cos (theta), -sin (theta)
// and we can choose to have theta in the interval [-PI/2 ; +PI/2] // and we can choose to have theta in the interval [-PI/2 ; +PI/2]
Cartesian3D v1 = applyTo(Cartesian3D.PLUS_K); Cartesian3D v1 = applyTo(Cartesian3D.PLUS_K);
@ -954,9 +954,9 @@ public class Rotation implements Serializable {
} else if (order == RotationOrder.XYX) { } else if (order == RotationOrder.XYX) {
// r (Vector3D.plusI) coordinates are : // r (Cartesian3D.plusI) coordinates are :
// cos (theta), sin (phi2) sin (theta), cos (phi2) sin (theta) // cos (theta), sin (phi2) sin (theta), cos (phi2) sin (theta)
// (-r) (Vector3D.plusI) coordinates are : // (-r) (Cartesian3D.plusI) coordinates are :
// cos (theta), sin (theta) sin (phi1), -sin (theta) cos (phi1) // cos (theta), sin (theta) sin (phi1), -sin (theta) cos (phi1)
// and we can choose to have theta in the interval [0 ; PI] // and we can choose to have theta in the interval [0 ; PI]
Cartesian3D v1 = applyTo(Cartesian3D.PLUS_I); Cartesian3D v1 = applyTo(Cartesian3D.PLUS_I);
@ -972,9 +972,9 @@ public class Rotation implements Serializable {
} else if (order == RotationOrder.XZX) { } else if (order == RotationOrder.XZX) {
// r (Vector3D.plusI) coordinates are : // r (Cartesian3D.plusI) coordinates are :
// cos (psi), -cos (phi2) sin (psi), sin (phi2) sin (psi) // cos (psi), -cos (phi2) sin (psi), sin (phi2) sin (psi)
// (-r) (Vector3D.plusI) coordinates are : // (-r) (Cartesian3D.plusI) coordinates are :
// cos (psi), sin (psi) cos (phi1), sin (psi) sin (phi1) // cos (psi), sin (psi) cos (phi1), sin (psi) sin (phi1)
// and we can choose to have psi in the interval [0 ; PI] // and we can choose to have psi in the interval [0 ; PI]
Cartesian3D v1 = applyTo(Cartesian3D.PLUS_I); Cartesian3D v1 = applyTo(Cartesian3D.PLUS_I);
@ -990,9 +990,9 @@ public class Rotation implements Serializable {
} else if (order == RotationOrder.YXY) { } else if (order == RotationOrder.YXY) {
// r (Vector3D.plusJ) coordinates are : // r (Cartesian3D.plusJ) coordinates are :
// sin (phi) sin (theta2), cos (phi), -sin (phi) cos (theta2) // sin (phi) sin (theta2), cos (phi), -sin (phi) cos (theta2)
// (-r) (Vector3D.plusJ) coordinates are : // (-r) (Cartesian3D.plusJ) coordinates are :
// sin (theta1) sin (phi), cos (phi), cos (theta1) sin (phi) // sin (theta1) sin (phi), cos (phi), cos (theta1) sin (phi)
// and we can choose to have phi in the interval [0 ; PI] // and we can choose to have phi in the interval [0 ; PI]
Cartesian3D v1 = applyTo(Cartesian3D.PLUS_J); Cartesian3D v1 = applyTo(Cartesian3D.PLUS_J);
@ -1008,9 +1008,9 @@ public class Rotation implements Serializable {
} else if (order == RotationOrder.YZY) { } else if (order == RotationOrder.YZY) {
// r (Vector3D.plusJ) coordinates are : // r (Cartesian3D.plusJ) coordinates are :
// sin (psi) cos (theta2), cos (psi), sin (psi) sin (theta2) // sin (psi) cos (theta2), cos (psi), sin (psi) sin (theta2)
// (-r) (Vector3D.plusJ) coordinates are : // (-r) (Cartesian3D.plusJ) coordinates are :
// -cos (theta1) sin (psi), cos (psi), sin (theta1) sin (psi) // -cos (theta1) sin (psi), cos (psi), sin (theta1) sin (psi)
// and we can choose to have psi in the interval [0 ; PI] // and we can choose to have psi in the interval [0 ; PI]
Cartesian3D v1 = applyTo(Cartesian3D.PLUS_J); Cartesian3D v1 = applyTo(Cartesian3D.PLUS_J);
@ -1026,9 +1026,9 @@ public class Rotation implements Serializable {
} else if (order == RotationOrder.ZXZ) { } else if (order == RotationOrder.ZXZ) {
// r (Vector3D.plusK) coordinates are : // r (Cartesian3D.plusK) coordinates are :
// sin (phi) sin (psi2), sin (phi) cos (psi2), cos (phi) // sin (phi) sin (psi2), sin (phi) cos (psi2), cos (phi)
// (-r) (Vector3D.plusK) coordinates are : // (-r) (Cartesian3D.plusK) coordinates are :
// sin (psi1) sin (phi), -cos (psi1) sin (phi), cos (phi) // sin (psi1) sin (phi), -cos (psi1) sin (phi), cos (phi)
// and we can choose to have phi in the interval [0 ; PI] // and we can choose to have phi in the interval [0 ; PI]
Cartesian3D v1 = applyTo(Cartesian3D.PLUS_K); Cartesian3D v1 = applyTo(Cartesian3D.PLUS_K);
@ -1044,9 +1044,9 @@ public class Rotation implements Serializable {
} else { // last possibility is ZYZ } else { // last possibility is ZYZ
// r (Vector3D.plusK) coordinates are : // r (Cartesian3D.plusK) coordinates are :
// -sin (theta) cos (psi2), sin (theta) sin (psi2), cos (theta) // -sin (theta) cos (psi2), sin (theta) sin (psi2), cos (theta)
// (-r) (Vector3D.plusK) coordinates are : // (-r) (Cartesian3D.plusK) coordinates are :
// cos (psi1) sin (theta), sin (psi1) sin (theta), cos (theta) // cos (psi1) sin (theta), sin (psi1) sin (theta), cos (theta)
// and we can choose to have theta in the interval [0 ; PI] // and we can choose to have theta in the interval [0 ; PI]
Cartesian3D v1 = applyTo(Cartesian3D.PLUS_K); Cartesian3D v1 = applyTo(Cartesian3D.PLUS_K);

View File

@ -31,10 +31,10 @@ public enum RotationConvention {
* </p> * </p>
* <p> * <p>
* This means that if we define rotation r is a 90 degrees rotation around * This means that if we define rotation r is a 90 degrees rotation around
* the Z axis, the image of vector {@link Vector3D#PLUS_I} would be * the Z axis, the image of vector {@link Cartesian3D#PLUS_I} would be
* {@link Vector3D#PLUS_J}, the image of vector {@link Vector3D#PLUS_J} * {@link Cartesian3D#PLUS_J}, the image of vector {@link Cartesian3D#PLUS_J}
* would be {@link Vector3D#MINUS_I}, the image of vector {@link Vector3D#PLUS_K} * would be {@link Cartesian3D#MINUS_I}, the image of vector {@link Cartesian3D#PLUS_K}
* would be {@link Vector3D#PLUS_K}, and the image of vector with coordinates (1, 2, 3) * would be {@link Cartesian3D#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. * would be vector (-2, 1, 3). This means that the vector rotates counterclockwise.
* </p> * </p>
* <p> * <p>
@ -58,10 +58,10 @@ public enum RotationConvention {
* </p> * </p>
* <p> * <p>
* This means that if we define rotation r is a 90 degrees rotation around * This means that if we define rotation r is a 90 degrees rotation around
* the Z axis, the image of vector {@link Vector3D#PLUS_I} would be * the Z axis, the image of vector {@link Cartesian3D#PLUS_I} would be
* {@link Vector3D#MINUS_J}, the image of vector {@link Vector3D#PLUS_J} * {@link Cartesian3D#MINUS_J}, the image of vector {@link Cartesian3D#PLUS_J}
* would be {@link Vector3D#PLUS_I}, the image of vector {@link Vector3D#PLUS_K} * would be {@link Cartesian3D#PLUS_I}, the image of vector {@link Cartesian3D#PLUS_K}
* would be {@link Vector3D#PLUS_K}, and the image of vector with coordinates (1, 2, 3) * would be {@link Cartesian3D#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 * 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 * clockwise, because they are expressed with respect to a destination frame that is rotated
* counterclockwise. * counterclockwise.

View File

@ -27,7 +27,7 @@ import org.apache.commons.math4.geometry.Space;
* of the dimensions differences. As an example, {@link * of the dimensions differences. As an example, {@link
* org.apache.commons.math4.geometry.euclidean.threed.Line Line} in 3D * org.apache.commons.math4.geometry.euclidean.threed.Line Line} in 3D
* implements Embedding<{@link * implements Embedding<{@link
* org.apache.commons.math4.geometry.euclidean.threed.Vector3D Vector3D}, {link * org.apache.commons.math4.geometry.euclidean.threed.Cartesian3D Cartesian3D}, {link
* org.apache.commons.math4.geometry.euclidean.oned.Vector1D Vector1D}, i.e. it * org.apache.commons.math4.geometry.euclidean.oned.Vector1D Vector1D}, i.e. it
* maps directly dimensions 3 and 1.</p> * maps directly dimensions 3 and 1.</p>

View File

@ -147,7 +147,7 @@ public class Circle implements Hyperplane<Sphere2D>, Embedding<Sphere2D, Sphere1
} }
/** {@inheritDoc} /** {@inheritDoc}
* @see #getPhase(Vector3D) * @see #getPhase(Cartesian3D)
*/ */
@Override @Override
public S1Point toSubSpace(final Point<Sphere2D> point) { public S1Point toSubSpace(final Point<Sphere2D> point) {
@ -256,7 +256,7 @@ public class Circle implements Hyperplane<Sphere2D>, Embedding<Sphere2D, Sphere1
} }
/** {@inheritDoc} /** {@inheritDoc}
* @see #getOffset(Vector3D) * @see #getOffset(Cartesian3D)
*/ */
@Override @Override
public double getOffset(final Point<Sphere2D> point) { public double getOffset(final Point<Sphere2D> point) {

View File

@ -435,7 +435,7 @@ public class SphericalPolygonsSet extends AbstractRegion<Sphere2D, Sphere1D> {
* EnclosingBall<Sphere2D, S2Point> cap = complexShape.getEnclosingCap(); * EnclosingBall<Sphere2D, S2Point> cap = complexShape.getEnclosingCap();
* *
* // check lots of points * // check lots of points
* for (Vector3D p : points) { * for (Cartesian3D p : points) {
* *
* final Location l; * final Location l;
* if (cap.contains(p)) { * if (cap.contains(p)) {

View File

@ -64,7 +64,7 @@
package threed #DDDBD8 { package threed #DDDBD8 {
class Euclidean3D class Euclidean3D
class Vector3D class Cartesian3D
class Line class Line
class SubLine class SubLine
class Plane class Plane
@ -72,7 +72,7 @@
class PolyhedronsSet class PolyhedronsSet
Space <|.. Euclidean3D Space <|.. Euclidean3D
Vector_S_ <|.. Vector3D Vector_S_ <|.. Cartesian3D
Hyperplane_S_ <|.. Plane Hyperplane_S_ <|.. Plane
SubHyperplane_S_ <|.. SubPlane SubHyperplane_S_ <|.. SubPlane
Region_S_ <|.. PolyhedronsSet Region_S_ <|.. PolyhedronsSet

View File

@ -78,8 +78,8 @@
<p> <p>
<a href="../apidocs/org/apache/commons/math4/geometry/euclidean/oned/Vector1D.html"> <a href="../apidocs/org/apache/commons/math4/geometry/euclidean/oned/Vector1D.html">
Vector1D</a>, <a href="../apidocs/org/apache/commons/math4/geometry/euclidean/twod/Vector2D.html"> Vector1D</a>, <a href="../apidocs/org/apache/commons/math4/geometry/euclidean/twod/Vector2D.html">
Vector2D</a> and <a href="../apidocs/org/apache/commons/math4/geometry/euclidean/threed/Vector3D.html"> Vector2D</a> and <a href="../apidocs/org/apache/commons/math4/geometry/euclidean/threed/Cartesian3D.html">
Vector3D</a> provide simple vector types. One important feature is Cartesian3D</a> provide simple vector types. One important feature is
that instances of these classes are guaranteed that instances of these classes are guaranteed
to be immutable, this greatly simplifies modeling dynamical systems to be immutable, this greatly simplifies modeling dynamical systems
with changing states: once a vector has been computed, a reference to it with changing states: once a vector has been computed, a reference to it
@ -109,7 +109,7 @@
<p> <p>
<a href="../apidocs/org/apache/commons/math4/geometry/euclidean/threed/Rotation.html"> <a href="../apidocs/org/apache/commons/math4/geometry/euclidean/threed/Rotation.html">
Rotation</a> represents 3D rotations. Rotation</a> represents 3D rotations.
Rotation instances are also immutable objects, as Vector3D instances. Rotation instances are also immutable objects, as Cartesian3D instances.
</p> </p>
<p> <p>
Rotations can be represented by several different mathematical Rotations can be represented by several different mathematical
@ -174,8 +174,8 @@
definition and hence does not provide methods like definition and hence does not provide methods like
<code>projectVectorIntoDestinationFrame</code> or <code>projectVectorIntoDestinationFrame</code> or
<code>computeTransformedDirection</code>. It provides simpler and more <code>computeTransformedDirection</code>. It provides simpler and more
generic methods: <code>applyTo(Vector3D)</code> and generic methods: <code>applyTo(Cartesian3D)</code> and
<code>applyInverseTo(Vector3D)</code>. <code>applyInverseTo(Cartesian3D)</code>.
</p> </p>
<p> <p>
Since a rotation is basically a vectorial operator, several Since a rotation is basically a vectorial operator, several
@ -303,7 +303,7 @@ PolygonsSet empty = new PolygonsSet(new BSPTree&lt;Euclidean2D&gt;(false), toler
constructor is: constructor is:
</p> </p>
<source> <source>
PolyhedronsSet(List&lt;Vector3D&gt; vertices, List&lt;int[]&gt; facets, double tolerance); PolyhedronsSet(List&lt;Cartesian3D&gt; vertices, List&lt;int[]&gt; facets, double tolerance);
</source> </source>
<p> <p>
The vertices list contains all the vertices of the polyhedrons, the facets list defines the facets, The vertices list contains all the vertices of the polyhedrons, the facets list defines the facets,