## Class EAAf

• public class EAAf
extends Rotation3DVectorf
A class for representing an equivalent angle-axis rotation

This class defines an equivalent-axis-angle orientation vector also known
as an \thetak vector or "axis+angle" vector

The equivalent-axis-angle vector is the product of a unit vector \hat{\mathbf{k}} and an angle of rotation around that axis \theta

Note: given two EAA vectors \theta_1\mathbf{\hat{k}}_1 and \theta_2\mathbf{\hat{k}}_2 it is generally not possible to subtract
or add these vectors, except for the special case when \mathbf{\hat{k}}_1 == \mathbf{\hat{k}}_2 this is why this class does
not have any subtraction or addition operators
• ### Constructor Summary

Constructors
Constructor Description
EAAf()
Constructs an EAA vector initialized to \{0,0,0\}
EAAf​(float thetakx, float thetaky, float thetakz)
Constructs an initialized EAA vector
\thetak = \left[\begin{array}{c} \theta k_x\\ \theta k_y\\ \theta k_z \end{array}\right]
EAAf​(long cPtr, boolean cMemoryOwn)
EAAf​(EAAf eaa)
Copy Constructor
EAAf​(Rotation3Df R)
Extracts Equivalent axis-angle vector from Rotation matrix

EAAf​(Vector3Df eaa)
Constructs an initialized EAA vector

The angle of the EAA are \|eaa\| and the axis is \frac{eaa}{\|eaa\|}
EAAf​(Vector3Df axis, float angle)
Constructs an initialized EAA vector
EAAf​(Vector3Df v1, Vector3Df v2)
Constructs an EAA vector that will rotate v1 into
v2.
• ### Method Summary

All Methods
Modifier and Type Method Description
EAAf add​(Vector3Df rhs)
element wise multiplication.
EAAf addAssign​(Vector3Df rhs)
float angle()
Extracts the angle of rotation \theta
Vector3Df axis()
Extracts the axis of rotation vector \mathbf{\hat{\mathbf{k}}}
EAAf copy​(EAAf rhs)
copy operator
EAAf copy​(Rotation3Df rhs)
copy operator
EAAf copy​(Vector3Df rhs)
assign vector to EAA
EAAf cross​(EAAf eaa)
Calculates the cross product and returns the result
Vector3Df cross​(Vector3Df v)
Calculates the cross product and returns the result
void delete()
float dot​(EAAf eaa)
Calculates the cross product and returns the result
float dot​(Vector3Df v)
Calculates the dot product and returns the result
EigenVector3f e()
get as eigen vector
EAAf elemAdd​(float rhs)
EAAf elemAdd​(EAAf rhs)
EAAf elemDivide​(float rhs)
scalar devision
EAAf elemDivide​(EAAf rhs)
element wise devision ( this / rhs )
EAAf elemDivide​(Vector3Df rhs)
element wise devision ( this / rhs )
EAAf elemMultiply​(float rhs)
scalar multiplication
EAAf elemMultiply​(EAAf rhs)
element wise multiplication
EAAf elemMultiply​(Vector3Df rhs)
element wise multiplication
EAAf elemSubtract​(float rhs)
Scalar subtraction.
EAAf elemSubtract​(EAAf rhs)
element wise subtraction
boolean equals​(EAAf rhs)
Compare with rhs for equality.
boolean equals​(Vector3Df rhs)
Compare with rhs for equality.
float get​(long i)
static long getCPtr​(EAAf obj)
EAAf multiply​(EAAf rhs)
This is rotation multiplcation, and it is multiplication of two EAA's first
converted to a Rotation3D
EAAf negate()
Unary minus.
negative version
float norm1()
Returns the Manhatten norm (1-norm) of the vector
float norm2()
Returns the Euclidean norm (2-norm) of the vector
float normInf()
Returns the infinte norm ( \inf-norm) of the vector
boolean notEqual​(EAAf rhs)
Compare with rhs for inequality.
boolean notEqual​(Vector3Df rhs)
Compare with rhs for inequality.
EAAf scaleAngle​(float scale)
scale the angle, keeping the axis the same
void set​(long i, float d)
EAAf setAngle​(float angle)
change the angle of the EAA
long size()
Get the size of the EAA.
EAAf subtract​(Vector3Df rhs)
EAAf subtractAssign​(Vector3Df rhs)
subtraction operator
Rotation3Df toRotation3D()
Returns the corresponding 3\times 3 Rotation matrix
java.lang.String toString()
Vector3Df toVector3D()
get the underling Vector
• ### Methods inherited from class org.robwork.sdurw_math.Rotation3DVectorf

getCPtr
• ### Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
• ### Constructor Detail

• #### EAAf

public EAAf​(long cPtr,
boolean cMemoryOwn)
• #### EAAf

public EAAf​(Rotation3Df R)
Extracts Equivalent axis-angle vector from Rotation matrix

Parameters:
R - [in] A 3x3 rotation matrix \mathbf{R}

\theta = arccos(\frac{1}{2}(Trace(\mathbf{R})-1)=arccos(\frac{r_{11}+r_{22}+r_{33}-1}{2})

\thetak=log(\mathbf{R})=\frac{\theta}{2 sin \theta}(\mathbf{R}-\mathbf{R}^T) = \frac{\theta}{2 sin \theta} \left[ \begin{array}{c} r_{32}-r_{23}\\ r_{13}-r_{31}\\ r_{21}-r_{12} \end{array} \right]

\thetak= \left[ \begin{array}{c} 0\\ 0\\ 0 \end{array} \right] if \theta = 0

\thetak=\pi \left[ \begin{array}{c} \sqrt{(R(0,0)+1.0)/2.0}\\ \sqrt{(R(1,1)+1.0)/2.0}\\ \sqrt{(R(2,2)+1.0)/2.0} \end{array} \right] if \theta = \pi
• #### EAAf

public EAAf()
Constructs an EAA vector initialized to \{0,0,0\}
• #### EAAf

public EAAf​(Vector3Df axis,
float angle)
Constructs an initialized EAA vector
Parameters:
axis - [in] \mathbf{\hat{k}}
angle - [in] \theta
• #### EAAf

public EAAf​(float thetakx,
float thetaky,
float thetakz)
Constructs an initialized EAA vector
\thetak = \left[\begin{array}{c} \theta k_x\\ \theta k_y\\ \theta k_z \end{array}\right]
Parameters:
thetakx - [in] \theta k_x
thetaky - [in] \theta k_y
thetakz - [in] \theta k_z
• #### EAAf

public EAAf​(Vector3Df v1,
Vector3Df v2)
Constructs an EAA vector that will rotate v1 into
v2. Where v1 and v2 are normalized and described in the same reference frame.
Parameters:
v1 - [in] normalized vector
v2 - [in] normalized vector
• #### EAAf

public EAAf​(Vector3Df eaa)
Constructs an initialized EAA vector

The angle of the EAA are \|eaa\| and the axis is \frac{eaa}{\|eaa\|}
Parameters:
eaa - [in] Values to initialize the EAA
• #### EAAf

public EAAf​(EAAf eaa)
Copy Constructor
Parameters:
eaa - [in] Values to initialize the EAA
• ### Method Detail

• #### getCPtr

public static long getCPtr​(EAAf obj)
• #### delete

public void delete()
Overrides:
delete in class Rotation3DVectorf
• #### size

public long size()
Get the size of the EAA.
Returns:
the size (always 3).
• #### toRotation3D

public Rotation3Df toRotation3D()
Description copied from class: Rotation3DVectorf
Returns the corresponding 3\times 3 Rotation matrix
Overrides:
toRotation3D in class Rotation3DVectorf
Returns:
The rotation matrix
• #### angle

public float angle()
Extracts the angle of rotation \theta
Returns:
\theta
• #### setAngle

public EAAf setAngle​(float angle)
change the angle of the EAA
Parameters:
angle - [in] the new angle
Returns:
this object
• #### axis

public Vector3Df axis()
Extracts the axis of rotation vector \mathbf{\hat{\mathbf{k}}}
Returns:
\mathbf{\hat{\mathbf{k}}}
• #### toVector3D

public Vector3Df toVector3D()
get the underling Vector
Returns:
the vector
• #### e

public EigenVector3f e()
get as eigen vector
Returns:
Eigenvector
• #### get

public float get​(long i)
• #### set

public void set​(long i,
float d)
• #### negate

public EAAf negate()
Unary minus.
negative version

public EAAf elemAdd​(EAAf rhs)
Parameters:
rhs - [in] the EAA to be added
Returns:
the sum of the two EAA's
• #### elemSubtract

public EAAf elemSubtract​(EAAf rhs)
element wise subtraction
Parameters:
rhs - [in] the EAA to be subtracted
Returns:
the difference between the two EAA's
• #### elemDivide

public EAAf elemDivide​(EAAf rhs)
element wise devision ( this / rhs )
Parameters:
rhs - [in] the EAA to be devided with
Returns:
the result of division
• #### elemMultiply

public EAAf elemMultiply​(EAAf rhs)
element wise multiplication
Parameters:
rhs - [in] the EAA to be multiplyed with
Returns:
the result of division
• #### multiply

public EAAf multiply​(EAAf rhs)
This is rotation multiplcation, and it is multiplication of two EAA's first
converted to a Rotation3D
Parameters:
rhs - [in] the eaa to multiply with
Returns:
the new rotation
• #### elemMultiply

public EAAf elemMultiply​(float rhs)
scalar multiplication
Parameters:
rhs - [in] the scalar to multiply with
Returns:
the product
• #### elemDivide

public EAAf elemDivide​(float rhs)
scalar devision
Parameters:
rhs - [in] the scalar to devide with
Returns:
the resulting EAA
• #### elemSubtract

public EAAf elemSubtract​(float rhs)
Scalar subtraction.

public EAAf elemAdd​(float rhs)
• #### scaleAngle

public EAAf scaleAngle​(float scale)
scale the angle, keeping the axis the same
Parameters:
scale - [in] how much the angle should change
Returns:
a new EAA with the scaled angle

public EAAf add​(Vector3Df rhs)
element wise multiplication.
Parameters:
rhs - [in] the vector being devided with
Returns:
the resulting EAA
• #### subtract

public EAAf subtract​(Vector3Df rhs)
Parameters:
rhs - [in] the vector being added
Returns:
the resulting EAA
• #### elemDivide

public EAAf elemDivide​(Vector3Df rhs)
element wise devision ( this / rhs )
Parameters:
rhs - [in] the Vector to be devided with
Returns:
the result of division
• #### elemMultiply

public EAAf elemMultiply​(Vector3Df rhs)
element wise multiplication
Parameters:
rhs - [in] the Vector to be multiplyed with
Returns:
the result of division
• #### toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
• #### cross

public Vector3Df cross​(Vector3Df v)
Calculates the cross product and returns the result
Parameters:
v - [in] a Vector3D
Returns:
the resulting 3D vector
• #### cross

public EAAf cross​(EAAf eaa)
Calculates the cross product and returns the result
Parameters:
eaa - [in] a EAA
Returns:
the resulting 3D vector
• #### dot

public float dot​(Vector3Df v)
Calculates the dot product and returns the result
Parameters:
v - [in] a Vector3D
Returns:
the resulting scalar
• #### dot

public float dot​(EAAf eaa)
Calculates the cross product and returns the result
Parameters:
eaa - [in] a EAA
Returns:
the resulting 3D vector
• #### norm2

public float norm2()
Returns the Euclidean norm (2-norm) of the vector
Returns:
the norm
• #### norm1

public float norm1()
Returns the Manhatten norm (1-norm) of the vector
Returns:
the norm
• #### normInf

public float normInf()
Returns the infinte norm ( \inf-norm) of the vector
Returns:
the norm
• #### copy

public EAAf copy​(EAAf rhs)
copy operator
Parameters:
rhs - [in] the EAA to be copied
Returns:
reference to this EAA
• #### copy

public EAAf copy​(Vector3Df rhs)
assign vector to EAA
Parameters:
rhs - [in] the vector to asign
Returns:
reference to this EAA

public EAAf addAssign​(Vector3Df rhs)
Parameters:
rhs - [in] the right hand side of the operation
Returns:
reference to this EAA
• #### subtractAssign

public EAAf subtractAssign​(Vector3Df rhs)
subtraction operator
Parameters:
rhs - [in] the right hand side of the operation
Returns:
reference to this EAA
• #### copy

public EAAf copy​(Rotation3Df rhs)
copy operator
Parameters:
rhs - [in] the Rotation3D to be copied
Returns:
reference to this EAA
• #### equals

public boolean equals​(Vector3Df rhs)
Compare with rhs for equality.
Parameters:
rhs - [in] other vector.
Returns:
True if a equals b, false otherwise.
• #### notEqual

public boolean notEqual​(Vector3Df rhs)
Compare with rhs for inequality.
Parameters:
rhs - [in] other vector.
Returns:
True if a and b are different, false otherwise.
• #### equals

public boolean equals​(EAAf rhs)
Compare with rhs for equality.
Parameters:
rhs - [in] other vector.
Returns:
True if a equals b, false otherwise.
• #### notEqual

public boolean notEqual​(EAAf rhs)
Compare with rhs for inequality.
Parameters:
rhs - [in] other vector.
Returns:
True if a and b are different, false otherwise.