Package org.robwork.sdurw_math
Class Transform3D
- java.lang.Object
- 
- org.robwork.sdurw_math.Transform3D
 
- 
 public class Transform3D extends java.lang.Object
- 
- 
Constructor SummaryConstructors Constructor Description Transform3D()Default Constructor.
 
 Initializes with 0 translation and Identity matrix as rotationTransform3D(long cPtr, boolean cMemoryOwn)Transform3D(Rotation3D R)A homogeneous transform with a rotation of R and a
 translation of zero.Transform3D(Transform3D t)Copy ConstructorTransform3D(Vector3D d)A homogeneous transform with a rotation of zero and a
 translation of d.Transform3D(Vector3D d, Rotation3D R)Constructs a homogeneous transformTransform3D(Vector3D d, Rotation3DVector r)Constructs a homogeneous transform
 
 Calling this constructor is equivalent to the transform
 Transform3D(d, r.toRotation3D()).
 
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Transform3DcraigDH(double alpha, double a, double d, double theta)voiddelete()static Transform3DDH(double alpha, double a, double d, double theta)static Transform3DDHHGP(double alpha, double a, double beta, double b)EigenMatrix4de()Returns a Eigen 4x4 matrix \mathbf{M}\in SE(3) that represents this homogeneous transformation
 booleanequal(Transform3D t3d)Compares the transformations with a given precision
 
 Performs an element wise comparison.booleanequal(Transform3D t3d, double precision)Compares the transformations with a given precision
 
 Performs an element wise comparison.booleanequals(Transform3D rhs)Comparison operator.
 
 The comparison operator makes a element wise comparison.
 Returns true only if all elements are equal.
 doubleget(long row, long column)static longgetCPtr(Transform3D obj)static Transform3Didentity()static Transform3DinvMult(Transform3D t1, Transform3D t2)computes the inverse of t1 and multiplies it with t2.
 The result is saved in t1.static Transform3DinvMult(Transform3D t1, Transform3D t2, Transform3D t3)computes the inverse of t1 and multiplies it with t2.
 The result is saved in t1.static Transform3DmakeLookAt(Vector3D eye, Vector3D center, Vector3D up)creates a transformation that is positioned in eye and looking toward
 center along -z where up indicates the upward direction along which the y-axis
 is placed.Transform3Dmultiply(Transform3D bTc)static voidmultiply(Transform3D a, Transform3D b, Transform3D result)Write to result the product a * b.Vector3Dmultiply(Vector3D bP)Calculates \robax{a}{\mathbf{p}} = \robabx{a}{b}{\mathbf{T}} \robax{b}{\mathbf{p}} thus transforming point \mathbf{p} from frame b
 to frame aVelocityScrew6Dmultiply(VelocityScrew6D rhs)Wrench6Dmultiply(Wrench6D rhs)booleannotEqual(Transform3D rhs)Comparison operator.
 
 The comparison operator makes a element wise comparison.
 Returns true if any of the elements are different.
 Vector3DP()Gets the position part \mathbf{d} from \mathbf{T}Rotation3DR()Gets the rotation part \mathbf{R} from \mathbf{T}voidset(long row, long column, double d)java.lang.StringtoString()
 
- 
- 
- 
Constructor Detail- 
Transform3Dpublic Transform3D(long cPtr, boolean cMemoryOwn)
 - 
Transform3Dpublic Transform3D() Default Constructor.
 
 Initializes with 0 translation and Identity matrix as rotation
 - 
Transform3Dpublic Transform3D(Vector3D d, Rotation3D R) Constructs a homogeneous transform- Parameters:
- d- [in] \mathbf{d} A 3x1 translation vector
- R- [in] \mathbf{R} A 3x3 rotation matrix
 
 - 
Transform3Dpublic Transform3D(Rotation3D R) A homogeneous transform with a rotation of R and a
 translation of zero.
 - 
Transform3Dpublic Transform3D(Vector3D d) A homogeneous transform with a rotation of zero and a
 translation of d.
 - 
Transform3Dpublic Transform3D(Transform3D t) Copy Constructor- Parameters:
- t- [in] Values to initialize the transform
 
 - 
Transform3Dpublic Transform3D(Vector3D d, Rotation3DVector r) Constructs a homogeneous transform
 
 Calling this constructor is equivalent to the transform
 Transform3D(d, r.toRotation3D()).
 - Parameters:
- d- [in] \mathbf{d} A 3x1 translation vector
- r- [in] \mathbf{r} A 3x1 rotation vector
 
 
- 
 - 
Method Detail- 
getCPtrpublic static long getCPtr(Transform3D obj) 
 - 
deletepublic void delete() 
 - 
DHpublic static Transform3D DH(double alpha, double a, double d, double theta) 
 - 
craigDHpublic static Transform3D craigDH(double alpha, double a, double d, double theta) 
 - 
DHHGPpublic static Transform3D DHHGP(double alpha, double a, double beta, double b) 
 - 
identitypublic static Transform3D identity() 
 - 
getpublic double get(long row, long column)
 - 
setpublic void set(long row, long column, double d)
 - 
equalspublic boolean equals(Transform3D rhs) Comparison operator.
 
 The comparison operator makes a element wise comparison.
 Returns true only if all elements are equal.
 - Parameters:
- rhs- [in] Transform to compare with
- Returns:
- True if equal.
 
 - 
notEqualpublic boolean notEqual(Transform3D rhs) Comparison operator.
 
 The comparison operator makes a element wise comparison.
 Returns true if any of the elements are different.
 - Parameters:
- rhs- [in] Transform to compare with
- Returns:
- True if not equal.
 
 - 
equalpublic boolean equal(Transform3D t3d, double precision) Compares the transformations with a given precision
 
 Performs an element wise comparison. Two elements are considered equal if the difference
 are less than precision.
 - Parameters:
- t3d- [in] Transform to compare with
- precision- [in] The precision to use for testing
- Returns:
- True if all elements are less than precision apart.
 
 - 
equalpublic boolean equal(Transform3D t3d) Compares the transformations with a given precision
 
 Performs an element wise comparison. Two elements are considered equal if the difference
 are less than precision.
 - Parameters:
- t3d- [in] Transform to compare with
 
- Returns:
- True if all elements are less than precision apart.
 
 - 
multiplypublic Transform3D multiply(Transform3D bTc) 
 - 
multiplypublic Vector3D multiply(Vector3D bP) Calculates \robax{a}{\mathbf{p}} = \robabx{a}{b}{\mathbf{T}} \robax{b}{\mathbf{p}} thus transforming point \mathbf{p} from frame b
 to frame a- Parameters:
- bP- [in] \robax{b}{\mathbf{p}}
- Returns:
- \robax{a}{\mathbf{p}}
 
 - 
Rpublic Rotation3D R() Gets the rotation part \mathbf{R} from \mathbf{T}- Returns:
- \mathbf{R}
 
 - 
Ppublic Vector3D P() Gets the position part \mathbf{d} from \mathbf{T}- Returns:
- \mathbf{d}
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
multiplypublic static void multiply(Transform3D a, Transform3D b, Transform3D result) Write to result the product a * b.
 - 
invMultpublic static Transform3D invMult(Transform3D t1, Transform3D t2) computes the inverse of t1 and multiplies it with t2.
 The result is saved in t1. t1 = inv(t1) * t2
 - 
invMultpublic static Transform3D invMult(Transform3D t1, Transform3D t2, Transform3D t3) computes the inverse of t1 and multiplies it with t2.
 The result is saved in t1. t1 = inv(t1) * t2
 - 
makeLookAtpublic static Transform3D makeLookAt(Vector3D eye, Vector3D center, Vector3D up) creates a transformation that is positioned in eye and looking toward
 center along -z where up indicates the upward direction along which the y-axis
 is placed. Same convention as for gluLookAt
 and is handy for placing a cameraview.- Parameters:
- eye- [in] position of view
- center- [in] point to look toward
- up- [in] the upward direction (the
- Returns:
- Transformation
 
 - 
epublic EigenMatrix4d e() Returns a Eigen 4x4 matrix \mathbf{M}\in SE(3) that represents this homogeneous transformation
 - Returns:
- \mathbf{M}\in SE(3)
 
 - 
multiplypublic VelocityScrew6D multiply(VelocityScrew6D rhs) 
 
- 
 
-