Package org.robwork.sdurw_math
Class EAAd
- java.lang.Object
 - 
- org.robwork.sdurw_math.Rotation3DVectord
 - 
- org.robwork.sdurw_math.EAAd
 
 
 
- 
public class EAAd extends Rotation3DVectord
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 EAAd()Constructs an EAA vector initialized to \{0,0,0\}EAAd(double thetakx, double thetaky, double thetakz)Constructs an initialized EAA vector
\thetak = \left[\begin{array}{c} \theta k_x\\ \theta k_y\\ \theta k_z \end{array}\right]EAAd(long cPtr, boolean cMemoryOwn)EAAd(EAAd eaa)Copy ConstructorEAAd(Rotation3Dd R)Extracts Equivalent axis-angle vector from Rotation matrix
EAAd(Vector3Dd eaa)Constructs an initialized EAA vector
The angle of the EAA are \|eaa\| and the axis is \frac{eaa}{\|eaa\|}EAAd(Vector3Dd axis, double angle)Constructs an initialized EAA vectorEAAd(Vector3Dd v1, Vector3Dd v2)Constructs an EAA vector that will rotate v1 into
v2. 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description EAAdadd(Vector3Dd rhs)element wise multiplication.EAAdaddAssign(Vector3Dd rhs)addition operatordoubleangle()Extracts the angle of rotation \thetaVector3Ddaxis()Extracts the axis of rotation vector \mathbf{\hat{\mathbf{k}}}EAAdcopy(EAAd rhs)copy operatorEAAdcopy(Rotation3Dd rhs)copy operatorEAAdcopy(Vector3Dd rhs)assign vector to EAAEAAdcross(EAAd eaa)Calculates the cross product and returns the resultVector3Ddcross(Vector3Dd v)Calculates the cross product and returns the resultvoiddelete()doubledot(EAAd eaa)Calculates the cross product and returns the resultdoubledot(Vector3Dd v)Calculates the dot product and returns the resultEigenVector3de()get as eigen vectorEAAdelemAdd(double rhs)Scalar addition.EAAdelemAdd(EAAd rhs)element wise additionEAAdelemDivide(double rhs)scalar devisionEAAdelemDivide(EAAd rhs)element wise devision ( this / rhs )EAAdelemDivide(Vector3Dd rhs)element wise devision ( this / rhs )EAAdelemMultiply(double rhs)scalar multiplicationEAAdelemMultiply(EAAd rhs)element wise multiplicationEAAdelemMultiply(Vector3Dd rhs)element wise multiplicationEAAdelemSubtract(double rhs)Scalar subtraction.EAAdelemSubtract(EAAd rhs)element wise subtractionbooleanequals(EAAd rhs)Compare with rhs for equality.booleanequals(Vector3Dd rhs)Compare with rhs for equality.doubleget(long i)static longgetCPtr(EAAd obj)EAAdmultiply(EAAd rhs)This is rotation multiplcation, and it is multiplication of two EAA's first
converted to a Rotation3DEAAdnegate()Unary minus.
negative versiondoublenorm1()Returns the Manhatten norm (1-norm) of the vectordoublenorm2()Returns the Euclidean norm (2-norm) of the vectordoublenormInf()Returns the infinte norm ( \inf-norm) of the vectorbooleannotEqual(EAAd rhs)Compare with rhs for inequality.booleannotEqual(Vector3Dd rhs)Compare with rhs for inequality.EAAdscaleAngle(double scale)scale the angle, keeping the axis the samevoidset(long i, double d)EAAdsetAngle(double angle)change the angle of the EAAlongsize()Get the size of the EAA.EAAdsubtract(Vector3Dd rhs)Vector additionEAAdsubtractAssign(Vector3Dd rhs)subtraction operatorRotation3DdtoRotation3D()Returns the corresponding 3\times 3 Rotation matrixjava.lang.StringtoString()Vector3DdtoVector3D()get the underling Vector- 
Methods inherited from class org.robwork.sdurw_math.Rotation3DVectord
getCPtr 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
EAAd
public EAAd(long cPtr, boolean cMemoryOwn) 
- 
EAAd
public EAAd(Rotation3Dd 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
 
- 
EAAd
public EAAd()
Constructs an EAA vector initialized to \{0,0,0\} 
- 
EAAd
public EAAd(Vector3Dd axis, double angle)
Constructs an initialized EAA vector- Parameters:
 axis- [in] \mathbf{\hat{k}}angle- [in] \theta
 
- 
EAAd
public EAAd(double thetakx, double thetaky, double 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_xthetaky- [in] \theta k_ythetakz- [in] \theta k_z
 
- 
EAAd
public EAAd(Vector3Dd v1, Vector3Dd 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 vectorv2- [in] normalized vector
 
- 
EAAd
public EAAd(Vector3Dd 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
 
- 
EAAd
public EAAd(EAAd eaa)
Copy Constructor- Parameters:
 eaa- [in] Values to initialize the EAA
 
 - 
 
- 
Method Detail
- 
getCPtr
public static long getCPtr(EAAd obj)
 
- 
delete
public void delete()
- Overrides:
 deletein classRotation3DVectord
 
- 
size
public long size()
Get the size of the EAA.- Returns:
 - the size (always 3).
 
 
- 
toRotation3D
public Rotation3Dd toRotation3D()
Description copied from class:Rotation3DVectordReturns the corresponding 3\times 3 Rotation matrix- Overrides:
 toRotation3Din classRotation3DVectord- Returns:
 - The rotation matrix
 
 
- 
angle
public double angle()
Extracts the angle of rotation \theta- Returns:
 - \theta
 
 
- 
setAngle
public EAAd setAngle(double angle)
change the angle of the EAA- Parameters:
 angle- [in] the new angle- Returns:
 - this object
 
 
- 
axis
public Vector3Dd axis()
Extracts the axis of rotation vector \mathbf{\hat{\mathbf{k}}}- Returns:
 - \mathbf{\hat{\mathbf{k}}}
 
 
- 
toVector3D
public Vector3Dd toVector3D()
get the underling Vector- Returns:
 - the vector
 
 
- 
e
public EigenVector3d e()
get as eigen vector- Returns:
 - Eigenvector
 
 
- 
get
public double get(long i)
 
- 
set
public void set(long i, double d) 
- 
negate
public EAAd negate()
Unary minus.
negative version 
- 
elemAdd
public EAAd elemAdd(EAAd rhs)
element wise addition- Parameters:
 rhs- [in] the EAA to be added- Returns:
 - the sum of the two EAA's
 
 
- 
elemSubtract
public EAAd elemSubtract(EAAd rhs)
element wise subtraction- Parameters:
 rhs- [in] the EAA to be subtracted- Returns:
 - the difference between the two EAA's
 
 
- 
elemDivide
public EAAd elemDivide(EAAd rhs)
element wise devision ( this / rhs )- Parameters:
 rhs- [in] the EAA to be devided with- Returns:
 - the result of division
 
 
- 
elemMultiply
public EAAd elemMultiply(EAAd rhs)
element wise multiplication- Parameters:
 rhs- [in] the EAA to be multiplyed with- Returns:
 - the result of division
 
 
- 
multiply
public EAAd multiply(EAAd 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 EAAd elemMultiply(double rhs)
scalar multiplication- Parameters:
 rhs- [in] the scalar to multiply with- Returns:
 - the product
 
 
- 
elemDivide
public EAAd elemDivide(double rhs)
scalar devision- Parameters:
 rhs- [in] the scalar to devide with- Returns:
 - the resulting EAA
 
 
- 
elemSubtract
public EAAd elemSubtract(double rhs)
Scalar subtraction. 
- 
elemAdd
public EAAd elemAdd(double rhs)
Scalar addition. 
- 
scaleAngle
public EAAd scaleAngle(double 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
 
 
- 
add
public EAAd add(Vector3Dd rhs)
element wise multiplication.- Parameters:
 rhs- [in] the vector being devided with- Returns:
 - the resulting EAA
 
 
- 
subtract
public EAAd subtract(Vector3Dd rhs)
Vector addition- Parameters:
 rhs- [in] the vector being added- Returns:
 - the resulting EAA
 
 
- 
elemDivide
public EAAd elemDivide(Vector3Dd rhs)
element wise devision ( this / rhs )- Parameters:
 rhs- [in] the Vector to be devided with- Returns:
 - the result of division
 
 
- 
elemMultiply
public EAAd elemMultiply(Vector3Dd 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:
 toStringin classjava.lang.Object
 
- 
cross
public Vector3Dd cross(Vector3Dd v)
Calculates the cross product and returns the result- Parameters:
 v- [in] a Vector3D- Returns:
 - the resulting 3D vector
 
 
- 
cross
public EAAd cross(EAAd eaa)
Calculates the cross product and returns the result- Parameters:
 eaa- [in] a EAA- Returns:
 - the resulting 3D vector
 
 
- 
dot
public double dot(Vector3Dd v)
Calculates the dot product and returns the result- Parameters:
 v- [in] a Vector3D- Returns:
 - the resulting scalar
 
 
- 
dot
public double dot(EAAd eaa)
Calculates the cross product and returns the result- Parameters:
 eaa- [in] a EAA- Returns:
 - the resulting 3D vector
 
 
- 
norm2
public double norm2()
Returns the Euclidean norm (2-norm) of the vector- Returns:
 - the norm
 
 
- 
norm1
public double norm1()
Returns the Manhatten norm (1-norm) of the vector- Returns:
 - the norm
 
 
- 
normInf
public double normInf()
Returns the infinte norm ( \inf-norm) of the vector- Returns:
 - the norm
 
 
- 
copy
public EAAd copy(EAAd rhs)
copy operator- Parameters:
 rhs- [in] the EAA to be copied- Returns:
 - reference to this EAA
 
 
- 
copy
public EAAd copy(Vector3Dd rhs)
assign vector to EAA- Parameters:
 rhs- [in] the vector to asign- Returns:
 - reference to this EAA
 
 
- 
addAssign
public EAAd addAssign(Vector3Dd rhs)
addition operator- Parameters:
 rhs- [in] the right hand side of the operation- Returns:
 - reference to this EAA
 
 
- 
subtractAssign
public EAAd subtractAssign(Vector3Dd rhs)
subtraction operator- Parameters:
 rhs- [in] the right hand side of the operation- Returns:
 - reference to this EAA
 
 
- 
copy
public EAAd copy(Rotation3Dd rhs)
copy operator- Parameters:
 rhs- [in] the Rotation3D to be copied- Returns:
 - reference to this EAA
 
 
- 
equals
public boolean equals(Vector3Dd rhs)
Compare with rhs for equality.- Parameters:
 rhs- [in] other vector.- Returns:
 - True if a equals b, false otherwise.
 
 
- 
notEqual
public boolean notEqual(Vector3Dd 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(EAAd rhs)
Compare with rhs for equality.- Parameters:
 rhs- [in] other vector.- Returns:
 - True if a equals b, false otherwise.
 
 
- 
notEqual
public boolean notEqual(EAAd rhs)
Compare with rhs for inequality.- Parameters:
 rhs- [in] other vector.- Returns:
 - True if a and b are different, false otherwise.
 
 
 - 
 
 -