Package georegression.struct.se
Class Se3_F64
java.lang.Object
georegression.struct.se.Se3_F64
- All Implemented Interfaces:
InvertibleTransform<Se3_F64>
,SpecialEuclidean<Se3_F64>
,Serializable
A coordinate system transform composed of a rotation and translation. This transform is
a rigid body transform and is a member of the special euclidean group.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionorg.ejml.data.DMatrixRMaj
static final long
-
Constructor Summary
ConstructorDescriptionSe3_F64()
Creates a new transform that does nothing.Se3_F64
(org.ejml.data.DMatrixRMaj R, Vector3D_F64 T) Initializes the transform with the provided rotation and translation.Se3_F64
(org.ejml.data.DMatrixRMaj R, Vector3D_F64 T, boolean assign) Initializes the Se3_F64 with the rotation matrix and translation vector. -
Method Summary
Modifier and TypeMethodDescriptionComputes a transform which is the equivalent to applying 'this' then the 'second' transform.concatInvert
(Se3_F64 second, @Nullable Se3_F64 result) Implicitly inverts this transform before concating it to the second transform.copy()
Creates a new instance of the same SpecialEuclidean as this class.int
Returns the dimension of the space which this transform operates on.org.ejml.data.DMatrixRMaj
getR()
org.ejml.data.DMatrixRMaj
Returns the rotation matrixgetT()
Returns the translation vectordouble
getX()
double
getY()
double
getZ()
Computes a transform which is the inverse of this transform.invertConcat
(Se3_F64 second, @Nullable Se3_F64 result) Implicitly inverts this transform before concating it to the second transform.void
print()
void
print
(RotationType type) void
reset()
Sets the transform to its initial state of no transform.void
setRotation
(org.ejml.data.DMatrixRMaj R) Sets the rotation to R.Assigns the value of this transform using Euler anglessetTo
(double x, double y, double z, RotationType type, double A, double B, double C, double D) Assigns the value of this transform using Rodrigues (axis angle) or Quaternions.Set's 'this' Se3_F64 to be identical to the provided transform.void
setTranslation
(double x, double y, double z) Sets the translation to (x,y,z)void
Sets the translation to TtoString()
toString
(RotationType type) More compact toString() where the rotation matrix is encoded in one of the specified formats.transform
(Point3D_F64 src, @Nullable Point3D_F64 dst) Applies the transform to the src point and stores the result in dst.transform
(Point4D_F64 src, @Nullable Point4D_F64 dst) Applies the transform to the src point and stores the result in dst.transform
(Vector3D_F64 src, @Nullable Vector3D_F64 dst) Applies the rotation to the src vector and stores the result in dst.transformReverse
(Point3D_F64 src, @Nullable Point3D_F64 dst) Applies the reverse transform to the src point and stores the result in dst.transformReverse
(Point4D_F64 src, @Nullable Point4D_F64 dst) transformReverse
(Vector3D_F64 src, @Nullable Vector3D_F64 dst) Applies the reverse rotation to the src vector and stores the result in dst.void
zero()
Sets the rotation and translation to all zeros
-
Field Details
-
serialVersionUID
public static final long serialVersionUID- See Also:
-
R
public org.ejml.data.DMatrixRMaj R -
T
-
-
Constructor Details
-
Se3_F64
public Se3_F64()Creates a new transform that does nothing. -
Se3_F64
Initializes the transform with the provided rotation and translation.- Parameters:
R
- Rotation matrix.T
- Translation.
-
Se3_F64
Initializes the Se3_F64 with the rotation matrix and translation vector. If assign is true the reference to the provided parameters is saved, otherwise a copy is made.- Parameters:
R
- Rotation matrix.T
- Translation.assign
- If a reference is saved (true) or a copy made (false).
-
-
Method Details
-
setTo
Set's 'this' Se3_F64 to be identical to the provided transform.- Specified by:
setTo
in interfaceInvertibleTransform<Se3_F64>
- Parameters:
se
- The transform that is being copied.- Returns:
- A reference to 'this' to enable chaining
-
zero
public void zero()Sets the rotation and translation to all zeros -
setRotation
public void setRotation(org.ejml.data.DMatrixRMaj R) Sets the rotation to R.- Parameters:
R
- New rotation.
-
setTranslation
Sets the translation to T- Parameters:
T
- New translation
-
setTranslation
public void setTranslation(double x, double y, double z) Sets the translation to (x,y,z)- Parameters:
x
- x component of translationy
- y component of translationz
- z component of translation
-
getRotation
public org.ejml.data.DMatrixRMaj getRotation()Returns the rotation matrix- Returns:
- rotation matrix
-
getTranslation
Returns the translation vector- Returns:
- translation vector
-
getR
public org.ejml.data.DMatrixRMaj getR() -
getT
-
getX
public double getX() -
getY
public double getY() -
getZ
public double getZ() -
getDimension
public int getDimension()Description copied from interface:InvertibleTransform
Returns the dimension of the space which this transform operates on.- Specified by:
getDimension
in interfaceInvertibleTransform<Se3_F64>
- Returns:
- space's dimension
-
createInstance
Description copied from interface:InvertibleTransform
Creates a new instance of the same SpecialEuclidean as this class.- Specified by:
createInstance
in interfaceInvertibleTransform<Se3_F64>
- Returns:
- A new instance.
-
concat
Description copied from interface:InvertibleTransform
Computes a transform which is the equivalent to applying 'this' then the 'second' transform.
For example:
Point A = tran2( tran1( A ) );
Point A = tran12( A );
where tran12 = tran1.concat( tran2 , null );NOTE: 'second', 'result', and 'this' must all be unique instances.
- Specified by:
concat
in interfaceInvertibleTransform<Se3_F64>
- Parameters:
second
- The second transform which is applied. Not modified.result
- A transform which is equivalent to applying the first then the second. If null then a new instance is declared. Modified.- Returns:
- The equivalent transform.
-
invertConcat
Implicitly inverts this transform before concating it to the second transform. Equivalent to invert(null).concat(second, null);- Specified by:
invertConcat
in interfaceInvertibleTransform<Se3_F64>
- Parameters:
second
- The second transform which is applied. Not modified.result
- (Output) storage for rsulting transform. Can be null- Returns:
- The computed transform. If result isn't null then result is returned.
-
concatInvert
Implicitly inverts this transform before concating it to the second transform. Equivalent to invert(null).concat(second, null);- Specified by:
concatInvert
in interfaceInvertibleTransform<Se3_F64>
- Parameters:
second
- The second transform which is applied. Not modified.result
- (Output) storage for rsulting transform. Can be null- Returns:
- The computed transform. If result isn't null then result is returned.
-
invert
Description copied from interface:InvertibleTransform
Computes a transform which is the inverse of this transform. The 'this' matrix can be passed in as an input.
Example:
Point A = tran(B);
Point B = inv(A);
where inv = invert( tran );- Specified by:
invert
in interfaceInvertibleTransform<Se3_F64>
- Parameters:
inverse
- Where the inverse will be stored. If null a new instance is created. Modified.- Returns:
- The inverse transform.
-
reset
public void reset()Description copied from interface:InvertibleTransform
Sets the transform to its initial state of no transform.- Specified by:
reset
in interfaceInvertibleTransform<Se3_F64>
-
setTo
public Se3_F64 setTo(double x, double y, double z, EulerType type, double rotA, double rotB, double rotC) Assigns the value of this transform using Euler angles- Returns:
- Reference to 'this'
-
setTo
public Se3_F64 setTo(double x, double y, double z, RotationType type, double A, double B, double C, double D) Assigns the value of this transform using Rodrigues (axis angle) or Quaternions. If Rodrigues then A=axisX, B=axisY, C=axisZ, D=theta. If Quaternion then A=w, B=x, C=y, D=z.- Returns:
- Reference to 'this'
-
transform
Applies the transform to the src point and stores the result in dst. src and dst can be the same instance- Parameters:
src
- Inputdst
- Output- Returns:
- Output
- See Also:
-
transformReverse
Applies the reverse transform to the src point and stores the result in dst. src and dst can be the same instance- Parameters:
src
- Inputdst
- Output- Returns:
- Output
- See Also:
-
transform
Applies the rotation to the src vector and stores the result in dst. src and dst can be the same instance- Parameters:
src
- Inputdst
- Output- See Also:
-
transformReverse
Applies the reverse rotation to the src vector and stores the result in dst. src and dst can be the same instance- Parameters:
src
- Inputdst
- Output- See Also:
-
transform
Applies the transform to the src point and stores the result in dst. src and dst can be the same instance. For points in 3D homogenous coordinates.- Parameters:
src
- Input. Homogenous coordinatedst
- Output. Homogenous coordinate- Returns:
- Output. Homogenous coordinate
- See Also:
-
transformReverse
-
copy
-
toString
-
toString
More compact toString() where the rotation matrix is encoded in one of the specified formats. -
print
public void print() -
print
-