Detailed DescriptionModule to manage homogeneous transforms in R^3 used to manipulated 3D geometry.
Definition in file htransform.h.
Macro Definition Documentation
Dimensions of R^3.
Definition at line 27 of file htransform.h. Referenced by AccumulateEqVectors(), AccumulateVector2EqVector(), CopyEqVector(), DeleteEqVector(), DotProductEqVectors(), EqVectorFromVector(), EvaluateEqVector(), EvaluateEqVectorInt(), GetEqVectorElement(), HTransformAdd(), HTransformApply(), HTransformApplyRot(), HTransformPrint(), HTransformPrintT(), HTransformProduct(), HTransformSubstract(), HTransformTranspose(), InitEqVector(), PrintTransSeq(), ScaleEqVector(), SHTransformAdd(), SHTransformApply(), SHTransformApplyRot(), SHTransformCopy(), SHTransformDelete(), SHTransformEvaluate(), SHTransformFromEqVectors(), SHTransformInit(), SHTransformInverse(), SHTransformPostCtProduct(), SHTransformPreCtProduct(), SHTransformPrint(), SHTransformProduct(), SHTransformTranspose(), Var2AccumulateVector2EqVector(), VarAccumulateEqVectors(), VarAccumulateVector2EqVector(), and VarScaleEqVector().
One of the types of homogeneous transforms in R^3: Translation along X.
Definition at line 35 of file htransform.h. Referenced by DeriveTransSeq(), EvaluateTrans(), EvaluateTransSeq(), GetLinkTransSeq(), HTransformCreate(), PrintTransSeq(), RecomputeScalarEquations(), SHTransformCreate(), SHTransformVarCreate(), and UpdateUsedDOF().
One of the types of homogeneous transforms in R^3: Translation along Y.
Definition at line 43 of file htransform.h. Referenced by DeriveTransSeq(), EvaluateTrans(), EvaluateTransSeq(), HTransformCreate(), PrintTransSeq(), RecomputeScalarEquations(), SHTransformCreate(), SHTransformVarCreate(), and UpdateUsedDOF().
One of the types of homogeneous transforms in R^3: Translation along Z.
Definition at line 51 of file htransform.h. Referenced by DeriveTransSeq(), EvaluateTrans(), EvaluateTransSeq(), HTransformCreate(), PrintTransSeq(), RecomputeScalarEquations(), SHTransformCreate(), SHTransformVarCreate(), and UpdateUsedDOF().
One of the types of homogeneous transforms in R^3: Rotation about X.
Definition at line 59 of file htransform.h. Referenced by DeriveTransSeq(), EvaluateTrans(), EvaluateTransSeq(), GetJointTransform(), GetJointTransSeq(), HasRotations(), HTransformAcumRot(), HTransformCreate(), HTransformYawPitchRoll(), PrintTransSeq(), RecomputeScalarEquations(), SHTransformCreate(), SHTransformVarCreate(), and UpdateUsedDOF().
One of the types of homogeneous transforms in R^3: Rotation about Y.
Definition at line 67 of file htransform.h. Referenced by DeriveTransSeq(), EvaluateTrans(), EvaluateTransSeq(), GetJointTransform(), GetJointTransSeq(), HasRotations(), HTransformAcumRot(), HTransformCreate(), HTransformYawPitchRoll(), PrintTransSeq(), RecomputeScalarEquations(), SHTransformCreate(), SHTransformVarCreate(), and UpdateUsedDOF().
One of the types of homogeneous transforms in R^3: Rotation about Z.
Definition at line 75 of file htransform.h. Referenced by DeriveTransSeq(), EvaluateTrans(), EvaluateTransSeq(), GetJointTransform(), GetJointTransSeq(), HasRotations(), HTransformAcumRot(), HTransformCreate(), PrintTransSeq(), RecomputeScalarEquations(), SHTransformCreate(), SHTransformVarCreate(), and UpdateUsedDOF().
One of the axis of R^3.
Definition at line 83 of file htransform.h. Referenced by DeriveTransSeq(), EvaluateTrans(), GetJointDOFValues(), GetTransform2LinkAxisX(), GetYawPitchRoll(), HTransformAcumRot(), HTransformAcumTrans(), HTransformFromVectors(), HTransformInverse(), HTransformIsTranslation(), HTransformPrettyPrint(), HTransformRy(), HTransformRy2(), HTransformRz(), HTransformRz2(), HTransformScale(), HTransformScaleX(), HTransformTx(), HTransformTxyz(), RecomputeScalarEquations(), SHTransformFromEqVectors(), SHTransformRy(), SHTransformRz(), SHTransformTx(), SHTransformTxyz(), SHTransformVarDisplacementAlongVector(), SHTransformVarRx(), SHTransformVarRy(), SHTransformVarRz(), SHTransformVarTx(), and SHTransformVarTxyz().
One of the axis of R^3.
Definition at line 91 of file htransform.h. Referenced by DeriveTransSeq(), EvaluateTrans(), GetJointDOFValues(), GetTransform2LinkAxisX(), GetYawPitchRoll(), HTransformAcumRot(), HTransformAcumTrans(), HTransformFromVectors(), HTransformInverse(), HTransformIsTranslation(), HTransformPrettyPrint(), HTransformRx(), HTransformRx2(), HTransformRz(), HTransformRz2(), HTransformScale(), HTransformScaleY(), HTransformTxyz(), HTransformTy(), RecomputeScalarEquations(), SHTransformFromEqVectors(), SHTransformRx(), SHTransformRz(), SHTransformTxyz(), SHTransformTy(), SHTransformVarDisplacementAlongVector(), SHTransformVarRx(), SHTransformVarRy(), SHTransformVarRz(), SHTransformVarTxyz(), and SHTransformVarTy().
One of the axis of R^3.
Definition at line 99 of file htransform.h. Referenced by DeriveTransSeq(), EvaluateTrans(), GetJointDOFValues(), GetTransform2LinkAxisX(), GetYawPitchRoll(), HTransformAcumRot(), HTransformAcumTrans(), HTransformFromVectors(), HTransformInverse(), HTransformIsTranslation(), HTransformPrettyPrint(), HTransformRx(), HTransformRx2(), HTransformRy(), HTransformRy2(), HTransformScale(), HTransformScaleZ(), HTransformTxyz(), HTransformTz(), RecomputeScalarEquations(), SHTransformFromEqVectors(), SHTransformRx(), SHTransformRy(), SHTransformTxyz(), SHTransformTz(), SHTransformVarDisplacementAlongVector(), SHTransformVarRx(), SHTransformVarRy(), SHTransformVarRz(), SHTransformVarTxyz(), and SHTransformVarTz().
The 4-th dimension used to represent rotations with a lineal mapping.
Definition at line 108 of file htransform.h. Referenced by DeriveTransSeq(), EvaluateTrans(), GetJointDOFValues(), GetTransform2LinkAxisX(), GetTransform2LinkFLinks(), GetTransform2LinkLinks(), HTransform2GLMatrix(), HTransformAcumRot(), HTransformAcumTrans(), HTransformApply(), HTransformFromGLMatrix(), HTransformFromVectors(), HTransformGetElement(), HTransformInverse(), HTransformOrthonormalize(), HTransformPrettyPrint(), HTransformSetElement(), HTransformTx(), HTransformTxyz(), HTransformTy(), HTransformTz(), PQPTest(), RecomputeScalarEquations(), SetTranslationMEquation(), SHTransformApply(), SHTransformFromEqVectors(), SHTransformGetElement(), SHTransformIdentity(), SHTransformInverse(), SHTransformTx(), SHTransformTxyz(), SHTransformTy(), SHTransformTz(), SHTransformVarDisplacementAlongVector(), SHTransformVarRx(), SHTransformVarRy(), SHTransformVarRz(), SHTransformVarTx(), SHTransformVarTxyz(), SHTransformVarTy(), SHTransformVarTz(), and WorldDOF2Sol(). Typedef Documentation
A 4x4 matrix typically representing a homogenous matrix in R^3. This is also used to represent generic 4x4 matrices sometimes. Therefor operations do not assume any structure in the matrix.
Definition at line 129 of file htransform.h. Function Documentation
Initializes a homogeneous transform with the identity matrix.
Definition at line 69 of file htransform.c. References MATRIX_INT_COPY. Referenced by CDCallBackInfo(), EvaluateTransSeq(), FixVarInTransSeq(), GetLinkConfTransform(), GetLinkTransform(), GetLinkTransformsFromDOF(), GetTransform2LinkAxisX(), GetTransform2LinkFLinks(), GetTransform2LinkLinks(), GetTransform2LinkQLinks(), GetTransformFromBranch(), HTransformX2Vect(), InitJoint(), InitLink(), InitMEquation(), InitSolidCD(), main(), NewInPatchJoint(), NewRevUpJoint(), NewSphSphUpJoint(), ResetMEquation(), SHTransformEvaluate(), and SolidCorrection().
Initializes a homogeneous transform with the zero matrix.
Definition at line 75 of file htransform.c. References MATRIX_INT_COPY. Referenced by DeriveMEquation(), and DeriveTransSeq().
Initializes a homogeneous transform from another transform.
Definition at line 83 of file htransform.c. References MATRIX_INT_COPY. Referenced by CDCallBackInfo(), CheckCollisionSolid(), CopyJoint(), CopyLink(), CopyMEquation(), CopyTrans(), EvaluateTrans(), FixVarInTransSeq(), GetJointDOFValues(), GetJointTransform(), InitCtTrans(), and NewFixJoint().
Identifies identity matrix (up to a tiny error).
Definition at line 91 of file htransform.c. References Distance(), and ZERO. Referenced by AddCtTrans2TransSeq(), AddDispTrans2TransSeq(), AddPatchTrans2TransSeq(), AddTrans2TransSeq(), AddVarTrans2TransSeq(), FixVarInTransSeq(), HTransformPrettyPrint(), PrintMEquation(), PrintTransSeq(), SimplifyTransSeq(), SolidCorrection(), and TransformPolyhedron().
Identifies the null matrix (up to a tiny error).
Definition at line 97 of file htransform.c. References Distance(), and ZERO. Referenced by FixVarInMEquation().
Identifies translation matrices (up to a tiny error), i.e., it does not include any rotation. It returns TRUE also for the identity (no rotation and no translation).
Definition at line 102 of file htransform.c. References AXIS_X, AXIS_Y, AXIS_Z, and ZERO. Referenced by HasCtRotTransSeq(), and HTransformPrettyPrint().
Initializes a homogeneous transform as a translation along X.
Definition at line 112 of file htransform.c. References AXIS_H, AXIS_X, and MATRIX_INT_COPY. Referenced by EvaluateTrans(), GetLinkConfTransform(), GetLinkTransform(), HTransformCreate(), and main().
Initializes a homogeneous transform as a translation along Y.
Definition at line 123 of file htransform.c. References AXIS_H, AXIS_Y, and MATRIX_INT_COPY. Referenced by EvaluateTrans(), HTransformCreate(), main(), and SolidCorrection().
Initializes a homogeneous transform as a translation along Z.
Definition at line 134 of file htransform.c. References AXIS_H, AXIS_Z, and MATRIX_INT_COPY. Referenced by EvaluateTrans(), HTransformCreate(), and main().
Initializes a homogeneous transform as a translation.
Definition at line 146 of file htransform.c. References AXIS_H, AXIS_X, AXIS_Y, AXIS_Z, and MATRIX_INT_COPY. Referenced by EvaluateTrans(), GenerateSphereOFF(), GetJointTransform(), GetTransform2Link(), HTransformX2Vect(), main(), NewPrismaticJoint(), NewRevLowJoint(), NewRevUpJoint(), NewSphericalJoint(), and SolidCorrection().
Initializes a homogeneous transform as a rotation about X.
Definition at line 161 of file htransform.c. References AXIS_Y, AXIS_Z, and MATRIX_INT_COPY. Referenced by EvaluateTrans(), GetJointTransform(), HTransformCreate(), main(), NewRevoluteJoint(), and NewUniversalJoint().
Initializes a homogeneous transform as a rotation about Y.
Definition at line 178 of file htransform.c. References AXIS_X, AXIS_Z, and MATRIX_INT_COPY. Referenced by EvaluateTrans(), GetJointTransform(), HTransformCreate(), HTransformX2Vect(), and main().
Initializes a homogeneous transform as a rotation about Z.
Definition at line 195 of file htransform.c. References AXIS_X, AXIS_Y, and MATRIX_INT_COPY. Referenced by EvaluateTrans(), GenerateSphereOFF(), GetJointTransform(), HTransformCreate(), HTransformX2Vect(), HTransformYawPitchRoll(), and main().
Initializes a homogeneous transform as a rotation about X.
Definition at line 212 of file htransform.c. References AXIS_Y, AXIS_Z, and MATRIX_INT_COPY. Referenced by EvaluateTrans(), and GetJointTransSeq().
Initializes a homogeneous transform as a rotation about Y.
Definition at line 222 of file htransform.c. References AXIS_X, AXIS_Z, and MATRIX_INT_COPY. Referenced by EvaluateTrans().
Initializes a homogeneous transform as a rotation about Z.
Definition at line 232 of file htransform.c. References AXIS_X, AXIS_Y, and MATRIX_INT_COPY. Referenced by EvaluateTrans(), GetJointTransSeq(), and SolidCorrection().
Initializes a homogeneous transform as a scale matrix.
Definition at line 239 of file htransform.c. References AXIS_X, AXIS_Y, AXIS_Z, and MATRIX_INT_COPY. Referenced by main().
Initializes a homogeneous transform as a scale matrix along the X axis.
Definition at line 249 of file htransform.c. References AXIS_X, and MATRIX_INT_COPY. Referenced by GetLinkConfTransform(), and main().
Initializes a homogeneous transform as a scale matrix along the Y axis.
Definition at line 257 of file htransform.c. References AXIS_Y, and MATRIX_INT_COPY. Referenced by main().
Initializes a homogeneous transform as a scale matrix along the Z axis.
Definition at line 265 of file htransform.c. References AXIS_Z, and MATRIX_INT_COPY. Referenced by main().
Initializes a homogeneous transform as translation/rotation in a given degree of freedom.
Definition at line 278 of file htransform.c. References Error(), HTransformRx(), HTransformRy(), HTransformRz(), HTransformTx(), HTransformTy(), HTransformTz(), RX, RY, RZ, TX, TY, and TZ.
Sets an element in a homogeneous transform. Note that if the element value is not carefully computed the result of using this function could not be an homogeneous matrix anymore (recall that the 3x3 top left sub-matrix must be orthonormal).
Definition at line 312 of file htransform.c. References AXIS_H, and Error(). Referenced by ChangeLinkReferenceFrame(), DeriveTransSeq(), EvaluateTrans(), GetJointDOFValues(), GetTransform2LinkAxisX(), GetTransform2LinkFLinks(), GetTransform2LinkLinks(), GetTransform2LinkQLinks(), HTransformX2Vect(), main(), and SHTransformEvaluate().
Gets an element from a homogeneous transform.
Definition at line 329 of file htransform.c. References AXIS_H, and Error(). Referenced by EvaluateMEquation(), GenerateJointEquations(), GenerateLinkSolutionAxisX(), GenerateLinkSolutionFLinks(), GenerateLinkSolutionLinks(), GenerateLinkSolutionQLinks(), GetJointDOFValues(), NewFixJoint(), PQPTest(), PrintTransSeq(), SHTransformPostCtProduct(), SHTransformPreCtProduct(), WorldCoupleTensegrityVariable(), and WorldDOF2Sol().
Defines a homogeneous transform from 4 vectors defining its columns. No check is performed to verify if the rotation part (x,y,z columns) is actually a rotation matrix.
Definition at line 341 of file htransform.c. References AXIS_H, AXIS_X, AXIS_Y, and AXIS_Z. Referenced by Atoms2Transforms(), EvaluatePATrans(), EvaluateTrans(), GetJointDOFValues(), GetJointTransform(), NewRevoluteJoint(), and NewUniversalJoint().
Defines a homogeneous transform a la GL (colum-major) from our format of homogeneous transforms.
Definition at line 357 of file htransform.c. References AXIS_H. Referenced by CheckCollisionSolid(), and InitSolidCD().
The reverse of HTransform2GLMatrix.
Definition at line 379 of file htransform.c. References AXIS_H.
Product of two homogeneous transforms.
Definition at line 410 of file htransform.c. References DIM_SP, and MATRIX_INT_COPY. Referenced by AddCtTrans2TransSeq(), CheckCollisionSolid(), EvaluateTransSeq(), GenerateLinkSolutionFLinks(), GenerateLinkSolutionLinks(), GenerateSphereOFF(), GetJointDOFValues(), GetJointTransform(), GetLinkTransformsFromDOF(), GetMechanismDOFsFromTransforms(), GetTransform2LinkFLinks(), GetTransform2LinkLinks(), GetTransformFromBranch(), HTransformInverse(), HTransformX2Vect(), main(), MoveLinkFromTransform(), NewRevoluteJoint(), NewSphericalJoint(), NewUniversalJoint(), SimplifyTransSeq(), and SolidCorrection().
Addition of two homogeneous transforms.
Definition at line 443 of file htransform.c. References DIM_SP, and MATRIX_INT_COPY.
Substraction of two homogeneous transforms.
Definition at line 472 of file htransform.c. References DIM_SP, and MATRIX_INT_COPY. Referenced by FixVarInMEquation().
Addition of a homogeneous transform.
Definition at line 503 of file htransform.c. References AXIS_H, AXIS_X, AXIS_Y, AXIS_Z, HTransformProduct(), and MATRIX_INT_COPY. Referenced by AddTrans2TransSeq(), EvaluatePATrans(), GetJointDOFValues(), GetJointTransform(), GetLinkTransformsFromDOF(), GetTransformFromBranch(), InitWorldFromMolecule(), NewPrismaticJoint(), NewRevoluteJoint(), NewSphericalJoint(), NewUniversalJoint(), PrintCollisionInfoInt(), and TransInvert().
Orthonormalizes the rotation part of a homogenouos transform. This is to be used when we have an approximated homogeneous transform (for instance, a homogeneous transform that is derived after several floating point operations). If the rotation part is not orthonormal then the homogeneous transform is no longer a rigid transform (it produces deformations in the objects). Right now this is implemented in a simple way
An alternative implementation could be based in a SVD of the rotation matrix: after the decomposition the diagonal matrix of (squared) eigenvalues is set to the identity and the matrix is reconstucted. In this way we could avoid the bias of adjusting the matrix from the first column.
Definition at line 529 of file htransform.c. References AXIS_H, and MATRIX_INT_COPY. Referenced by GetTransform2LinkFLinks(), GetTransform2LinkLinks(), and GetTransform2LinkQLinks().
Computes the homogeneous matrix that transform a unitary vector along the X axis into a generic vector. The resulting transform includes, scaling, rotation and translation. This function is typically used when plotting cylinders. This is the reason to include scale factors in Y and Z (to deform the unitary cylinder along X with radii 1 so that we get the cylinder in the desired position and with the desired witdh, typically the same in Y and Z). The length is controlled by the start-end points of the cilynder.
Definition at line 574 of file htransform.c. References Error(), HTransformIdentity(), HTransformProduct(), HTransformRy(), HTransformRz(), HTransformSetElement(), HTransformTxyz(), and M_PI_2. Referenced by GenerateCylinderOFF(), NewInPatchJoint(), NewRevoluteJoint(), NewSphericalJoint(), NewUniversalJoint(), PlotCylinder(), and SolidCorrection().
Defines de rotation matrix resulting from R=Rz(a)Ry(b)Rx(c) This is the invers of GetYawPitchRoll.
Definition at line 625 of file htransform.c. References HTransformAcumRot(), HTransformRz(), RX, and RY. Referenced by main().
Recovers the Yaw, Pitch, and Roll angles from the rotation part of a homogeneous matrix, i.e., recovers the parameters such that Rz(a)Ry(b)Rx(c)=R with R the rotation part of the given transform. Note that in the expression Rz(a)Ry(b)Rx(c) we first apply the roll, then the pitch, and finally the yaw. The implementation uses the method taken from http://planning.cs.uiuc.edu/node103.html This is the inverse of HTransformYawPitchRoll
Definition at line 634 of file htransform.c. References AXIS_X, AXIS_Y, AXIS_Z, and M_PI_2. Referenced by GetJointDOFValues(), and HTransformPrettyPrint().
Transpose of a homogeneous transform. Note that, in general the transpose of a homogeneous transform is not a homogeneous transform.
Definition at line 672 of file htransform.c. References DIM_SP, and MATRIX_INT_COPY. Referenced by EvaluateTrans().
Computes the result of multiplying a homogeneous transform by a translation matrix with parameters tx, ty, tz. The result is accumulated in the given transform.
Definition at line 695 of file htransform.c. References AXIS_H, AXIS_X, AXIS_Y, and AXIS_Z. Referenced by EvaluateTransSeq(), and HTransformAcumTrans2().
Computes the result of multiplying a homogeneous transform by a translation matrix with parameters tx, ty, tz. The result is accumulated in the given transform.
Definition at line 710 of file htransform.c. References HTransformAcumTrans(), and MATRIX_INT_COPY.
Computes the result of multiplying a homogeneous transform by a rotation matrix. The result is accumulated in the given transform.
Definition at line 727 of file htransform.c. References AXIS_H, AXIS_X, AXIS_Y, AXIS_Z, Error(), RX, RY, and RZ. Referenced by EvaluateTransSeq(), GetJointTransform(), HTransformAcumRot2(), and HTransformYawPitchRoll().
Computes the result of multiplying a homogeneous transform by a rotation matrix.
Definition at line 770 of file htransform.c. References HTransformAcumRot(), and MATRIX_INT_COPY.
Multiply a homogeneous transform and a vector.
Definition at line 782 of file htransform.c. References AXIS_H, and DIM_SP. Referenced by ApplyLinkRotFLinks(), ApplyLinkRotLinks(), BioWordGetAtomPositionsFromConformation(), EvaluateMEquationXVectors(), GenerateCylinderOFF(), GenerateSphereOFF(), InitWorldFromMolecule(), main(), NewRevoluteJoint(), NewUniversalJoint(), PolyhedronPrintCenter(), PolyhedronPrintCenterAndRadius(), PrintCollisionInfoInt(), PrintJointAxes(), and TransformPolyhedron().
Applies the rotation encoded in a homogeneous transform to a vector (i.e., rotates the vector).
Definition at line 801 of file htransform.c. References DIM_SP. Referenced by EvaluateTrans(), GenerateJointSolution(), and PrintJointAxes().
Prints the a homogeneous transform to a stream that can be stdtout.
Definition at line 822 of file htransform.c. References DIM_SP. Referenced by Atoms2Transforms(), and StoreCollisionInfoInt().
Prints the transpose of a homogeneous transform to a stream that can be stdtout. This is implemented because computer graphics community use transposed homogeneous transforms and, consequently, this is how geomview requires the transforms to be printed.
Definition at line 848 of file htransform.c. References DIM_SP. Referenced by Move3dObject(), and PlotCylinder().
Prints a homogenoeus transform compactly using basic transforms, whenever possible.
Definition at line 863 of file htransform.c. References AXIS_H, AXIS_X, AXIS_Y, AXIS_Z, GetYawPitchRoll(), HTransformIsIdentity(), and HTransformIsTranslation(). Referenced by PrintJoint().
Deletes the information stored in the THTransform and frees the allocated memory space.
Definition at line 887 of file htransform.c. Referenced by AddTrans2TransSeq(), BioWordConformationFromAtomPositions(), CheckCollisionSolid(), DeleteBioWorld(), DeleteJoint(), DeleteLink(), DeleteLinkTransforms(), DeleteMEquation(), DeleteSolidCD(), DeleteTrans(), DeriveTransSeq(), EvaluateMEquation(), EvaluateMEquationXVectors(), EvaluateTransSeq(), FixVarInMEquation(), FixVarInTransSeq(), GenerateCylinderOFF(), GenerateLinkSolutionFLinks(), GenerateLinkSolutionLinks(), GenerateSphereOFF(), GetJointDOFValues(), GetJointTransform(), GetLinkTransformsFromDOF(), GetMechanismDOFsFromTransforms(), InitWorldFromMolecule(), main(), MoveLinkFromTransform(), NewRevoluteJoint(), NewUniversalJoint(), PlotCylinder(), and PrintCollisionInfoInt(). |
Follow us!