|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmaspack.matrix.MatrixObject
maspack.matrix.AffineTransform2dObject
maspack.matrix.RigidTransform2d
A specialized 3 x 3 matrix that implements a two-dimensional rigid body transformation in homogeneous coordinates.
A rigid body transformation is used to transform a point from one spatial coordinate frame into another. If x0 and x1 denote the point in the orginal frame 0 and target frame 1, respectively, then the transformation is computed according to
x1 = R x0 + pwhere R is a 2 x 2 rotation matrix and p is a translation vector. In homogenous coordinates, this operation can be represented as
[ x1 ] [ R p ] [ x0 ] [ ] = [ ] [ ] [ 1 ] [ 0 1 ] [ 1 ]The components p and R of the transformation represent the position and orientation of frame 0 with respect to frame 1. In particular, the translation vector p gives the origin position, while the columns of R give the directions of the axes.
If X01 is a transformation from frame 0 to frame 1, and X12 is a transformation from frame 1 to frame 2, then the transformation from frame 0 to frame 2 is given by the product
X02 = X12 X01In this way, a transformation can be created by multiplying a series of sub-transformations.
If X01 is a transformation from frame 0 to frame 1, then the inverse transformation X10 is a transformation from frame 1 to frame 0, and is given by
[ T T ] [ R -R p ] X10 = [ ] [ 0 1 ]
Field Summary | |
Vector2d |
p
Translation vector associated with this transformation. |
RotationMatrix2d |
R
Rotation matrix associated with this transformation. |
Constructor Summary | |
RigidTransform2d()
Creates a new transformation initialized to the identity. |
|
RigidTransform2d(double x,
double y,
double ang)
Creates a new transformation with the specified translation values and rotation angle |
|
RigidTransform2d(RigidTransform2d X)
Creates a new transformation which is a copy of an existing one. |
|
RigidTransform2d(Vector2d p,
double ang)
Creates a new transformation with the specified translation vector and rotation angle |
|
RigidTransform2d(Vector2d p,
RotationMatrix2d R)
Creates a new transformation with the specified translation vector and rotation matrix. |
Method Summary | |
boolean |
invert()
Inverts this transform in place. |
boolean |
invert(RigidTransform2d X)
Inverts transform X and places the result in this transform. |
void |
mul(RigidTransform2d X)
Post-multiplies this transformation by another and places the result in this transformation. |
void |
mul(RigidTransform2d X1,
RigidTransform2d X2)
Multiplies transformation X1 by X2 and places the result in this transformation. |
void |
mulInverse(RigidTransform2d X)
Post-multiplies this transformation by the inverse of transformation X and places the result in this transformation. |
boolean |
mulInverse(Vector3d vr,
Vector3d v1)
Multiplies the column vector v1 by the inverse of this transform and places the result in vr. |
void |
mulInverseBoth(RigidTransform2d X1,
RigidTransform2d X2)
Multiplies the inverse of transformation X1 by the inverse of transformation X2 and places the result in this transformation. |
void |
mulInverseLeft(RigidTransform2d X1,
RigidTransform2d X2)
Multiplies the inverse of transformation X1 by transformation X2 and places the result in this transformation. |
void |
mulInverseRight(RigidTransform2d X1,
RigidTransform2d X2)
Multiplies transformation X1 by the inverse of transformation X2 and places the result in this transformation. |
Methods inherited from class maspack.matrix.AffineTransform2dObject |
colSize, epsilonEquals, equals, get, get, getColumn, getRow, mul, mul, mulInverse, rowSize, set, set, set, setColumn, setIdentity, setRow |
Methods inherited from class maspack.matrix.MatrixObject |
determinant, epsilonEquals, equals, equals, frobeniusNorm, get, getColumn, getRow, infinityNorm, isFixedSize, oneNorm, scan, set, set, setColumn, setRow, setSize, toString, toString, toString |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public final RotationMatrix2d R
public final Vector2d p
Constructor Detail |
public RigidTransform2d()
public RigidTransform2d(Vector2d p, RotationMatrix2d R)
p
- translation vectorR
- rotation matrixpublic RigidTransform2d(Vector2d p, double ang)
p
- translation vectorang
- rotation angle (radians)public RigidTransform2d(double x, double y, double ang)
x
- translation x componenty
- translation y componentang
- rotation angle (radians)public RigidTransform2d(RigidTransform2d X)
X
- transform to copyMethod Detail |
public void mul(RigidTransform2d X)
X
- transformation to multiply bypublic void mul(RigidTransform2d X1, RigidTransform2d X2)
X1
- first transformationX2
- second transformationpublic void mulInverse(RigidTransform2d X)
X
- right-hand transformationpublic void mulInverseRight(RigidTransform2d X1, RigidTransform2d X2)
X1
- left-hand transformationX2
- right-hand transformationpublic void mulInverseLeft(RigidTransform2d X1, RigidTransform2d X2)
X1
- left-hand transformationX2
- right-hand transformationpublic void mulInverseBoth(RigidTransform2d X1, RigidTransform2d X2)
X1
- left-hand transformationX2
- right-hand transformationpublic boolean mulInverse(Vector3d vr, Vector3d v1)
mulInverse
in class AffineTransform2dObject
vr
- result vectorv1
- vector to multiply
public boolean invert()
invert
in class AffineTransform2dObject
public boolean invert(RigidTransform2d X)
X
- transform to invert
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |