Public Member Functions | Static Public Member Functions | Public Attributes | List of all members

3x4 matrix for defining coordinate frames and affine transformations. More...

#include <transform.h>

Public Member Functions

void InitIdentity ()
 returns an identity transformation, i.e. More...
 
void InitFrom (RotMatrixCR matrix)
 Returns a transformation with the given matrix part and a zero translation part. More...
 
void InitFrom (RotMatrixCR matrix, DPoint3dCR translation)
 Returns a transformation with the given matrix and translation parts. More...
 
void InitFrom (DPoint3dCR translation)
 Returns a transformation with identity matrix part and given translation part. More...
 
void InitFromMatrixAndFixedPoint (RotMatrixCR matrix, DPoint3dCR origin)
 Returns a transformation with given matrix part, and translation part computed from the matrix and a given fixed point. More...
 
void InitFrom (double x, double y, double z)
 Returns a transformation with identity matrix part and translation part given as x, y, and z components. More...
 
void InitFromRowValues (double x00, double x01, double x02, double tx, double x10, double x11, double x12, double ty, double x20, double x21, double x22, double tz)
 Copies the double values directly into the rows of this instance. More...
 
void InitFromOriginAndVectors (DPoint3dCR origin, DVec3dCR xVector, DVec3dCR yVector, DVec3dCR zVector)
 Returns a transformation with origin at origin, x-axis xVector, y-axis yVector, and z-axis zVector. More...
 
bool InitFromOriginXVectorYVectorSquareAndNormalize (DPoint3dCR origin, DVec3dCR xVector, DVec3dCR yVector)
 Returns a transformation with origin, x axis direction, and xy plane All axes are normalized and perpendicular. More...
 
void InitFrom4Points (DPoint3dCR origin, DPoint3dCR xPoint, DPoint3dCR yPoint, DPoint3dCR zPoint)
 Returns a transformation with origin at origin, x-axis from origin to xPoint, y-axis from origin to yPoint, and z-axis from origin to zPoint. More...
 
void InitFromPlaneOf3Points (DPoint3dCR origin, DPoint3dCR xPoint, DPoint3dCR yPoint)
 Returns a transformation with origin at origin, x-axis from origin to xPoint, y-axis from origin to yPoint, and z-axis equal to the cross product of x and y axes. More...
 
void InitFromPlaneNormalToLine (DPoint3dCR origin, DPoint3dCR xPoint, int axisId, bool normalize)
 Returns a (possibly skewed) transformation with origin origin, the axis axisId towards xPoint, and other axes perpendicular. More...
 
bool InitFrom (DMap4dCR hMap, int inverse)
 Initializes a Transform from the affine part of one of the matrices in an DMap4d. More...
 
void Copy (TransformCR source)
 Returns a copy of a transformation. More...
 
void InitFromOriginAndLengths (DPoint2dCR origin, double xAxisLength, double yAxisLength)
 Returns a transformation in the xy-plane with origin origin and x,y-axes of given lengths. More...
 
void InitFromOriginAngleAndLengths (DPoint2dCR origin, double xAxisAngleRadians, double xAxisLength, double yAxisLength)
 Returns a transformation in the xy-plane with origin origin and x,y-axes of the given lengths rotated counter-clockwise from standard position by the given angle. More...
 
void InitFromOriginAndVectors (DPoint2dCR origin, DVec2dR xVector, DVec2dR yVector)
 Sets this instance to a transformation in the xy-plane with origin at origin, x-axis xVector and y-axis yVector. More...
 
void InitFrom3Points (DPoint2dCR origin, DPoint2dCR xPoint, DPoint2dCR yPoint)
 Sets this instance to a transformation in the xy-plane with origin at origin, x-axis from origin to xPoint and y-axis from origin to yPoint. More...
 
bool InitNormalizedFrameFromOriginXPointYPoint (DPoint3dCR origin, DPoint3dCR xPoint, DPoint3dCR yPoint)
 Attempt to set up a coordinate frame origin at origin, x-axis from origin to xPoint, y-axis in plane with yPoint, All axes are normalized. More...
 
bool InitFrom (DMatrix4dCR matrix)
 Initialize from first three rows of DMatrix4d, divided by weight entry. More...
 
void InitFrom2Points (DPoint2dCR origin, DPoint2dCR xPoint, int axisId, bool normalize)
 Returns a transformation in the xy-plane with origin origin, axis axisId towards xPoint, and the other axis perpendicular. More...
 
bool InitUniformScaleApproximation (TransformCR transform, int primaryAxis, int secondaryAxis)
 Construct a transform which preserves both a primary column directon and a secondary column plane. More...
 
bool InverseOf (TransformCR in)
 Sets this instance to the inverse transform of in. More...
 
ValidatedTransform ValidatedInverse () const
 Return the inverse of the instance transform. More...
 
void InvertRigidBodyTransformation (TransformCR in)
 Sets this instance to a matrix which is the inverse of in IN THE SPECIAL CASE WHERE in HAS ONLY PURE ROTATION OR MIRRORING IN ITS ROTATIONAL PART. More...
 
void InitFromLineAndRotationAngle (DPoint3dCR point0, DPoint3dCR point1, double radians)
 Returns a transformation of rotation about a specified line. More...
 
bool InitFromMirrorPlane (DPoint3dCR origin, DVec3dCR normal)
 Initialize a transform that mirrors about a plane. More...
 
bool InitFromScalePerpendicularToPlane (DPoint3dCR origin, DVec3dCR normal, double scale)
 Initialize a transform that scales around a plane. More...
 
bool InitFromProjectionToPlane (DPoint3dCR origin, DVec3dCR normal)
 Initialize a transform that projects to a plane. More...
 
void InitProduct (TransformCR transform1, TransformCR transform2)
 Returns the product of two transformations. More...
 
void InitProduct (RotMatrixCR matrix, TransformCR transform)
 Returns the product of a matrix and a transformation. More...
 
void InitProduct (TransformCR transform, RotMatrixCR matrix)
 returns the product of a transformation times a matrix, treating the matrix as a transformation with zero as its translation components. More...
 
double GetFromMatrixByRowAndColumn (int row, int col) const
 Returns a value from a specified row and column of the matrix part of the transformation. More...
 
double GetPointComponent (int row) const
 Returns a value from a specified component of the point (translation) part of the transformation. More...
 
void GetOriginAndVectors (DPoint3dR origin, DVec3dR vector0, DVec3dR vector1, DVec3dR vector2) const
 Sets origin to the translation part, and sets vector0, vector1 vector2 to the columns of this instance. More...
 
void GetOriginAndVectors (DPoint2dR origin, DVec2dR vector0, DVec2dR vector1) const
 Sets origin to the translation part, and sets vector0 and vector1 to the columns of this 2D instance. More...
 
void Get4Points (DPoint3dR point0, DPoint3dR point1, DPoint3dR point2, DPoint3dR point3) const
 Sets point0 to the origin (translation part), and sets point1, point2 point3 to the x, y and z points (translations of columns of matrix part by origin) from this instance. More...
 
void Get4Points (DPoint3dP array) const
 Sets the four points in array to the origin (translation part), x, y and z points (translations of columns of matrix part by origin) from this instance. More...
 
void GetMatrix (RotMatrixR matrix) const
 Returns the matrix part of a transformation. More...
 
void SetMatrix (RotMatrixCR matrix)
 Overwrites the matrix part of a preexisting transformation. More...
 
void GetTranslation (DPoint3dR point) const
 Returns the translation (point) part of a transformation. More...
 
void SetTranslation (DPoint3dCR point)
 Sets the translation part of this instance to point. More...
 
void ZeroTranslation ()
 Sets the translation part of this instance to zero. More...
 
void GetTranslation (DPoint2dR point) const
 Sets the given point to the x- and y-coordinates of the translation part of this instance. More...
 
void SetTranslation (DPoint2dCR point)
 Sets the translation part of this instance to the given point. More...
 
void SetFixedPoint (DPoint3dCR point)
 Sets the translation part of this instance so that it leaves point point unchanged, i.e. More...
 
void SetFixedPoint (DPoint2dCR point)
 Sets the translation part of this instance so that it leaves the given point unchanged, i.e. More...
 
void GetMatrixColumn (DVec3dR column, int index) const
 Returns a column from the matrix part of the transformation. More...
 
void GetMatrixRow (DVec3dR row, int index) const
 Returns a row from the matrix part of the transformation. More...
 
double MatrixColumnMagnitude (int i) const
 return the magnitude of a column of the matrix. More...
 
bool IsEqual (TransformCR transform2) const
 Returns true if two transforms have exact (bitwise) equality. More...
 
bool IsEqual (TransformCR transform2, double matrixTolerance, double pointTolerance) const
 Returns true if two transformations are equal within tolerance, using separate tolerances for the matrix and point parts. More...
 
double MaxDiff (TransformCR otherTransform) const
 Returns the largest absolute value difference between corresponding coefficients. More...
 
double Determinant () const
 Return the determinant of the matrix part. More...
 
double ColumnXMagnitude () const
 Return magnitude of X column. This is commonly considered as the scale factor of the transform. More...
 
void Multiply (DPoint3dR point) const
 Multiplies a point by a transform, returning the result in place of the input point. More...
 
void Multiply (DPoint3dR result, DPoint3dCR point) const
 Returns the product of a transform times a point. More...
 
void Multiply (DPoint3dR point, double x, double y, double z) const
 Returns the product of a matrix times a point, with the point specified as explict x, y, and z values. More...
 
void Multiply (DPoint3dP pointArray, int numPoint) const
 Multiplies this instance times each column vector in pointArray and replaces pointArray with the resulting points. More...
 
void Multiply (DPoint3dP outPoint, DPoint3dCP inPoint, int numPoint) const
 Multiplies this instance times each column vector in inPoint and places the resulting points in outPoint. More...
 
void MultiplyTranspose (DPoint3dP outPoint, DPoint3dCP inPoint, int numPoint) const
 Multiplies this instance times each column vector in inPoint, using the transpose of the matrix part of this instance in the multiplications, and places the resulting points in outPoint. More...
 
void MultiplyTranspose (DPoint3dP pointArray, int numPoint) const
 Multiplies this instance times each column vector in pointArray, using the transpose of the matrix part of this instance in the multiplications, and replaces pointArray with the resulting points. More...
 
void MultiplyMatrixOnly (DPoint3dR point, double x, double y, double z) const
 Multiplies the matrix part of this instance times the column vector constructed from components x,y,z. More...
 
void MultiplyMatrixOnly (DPoint3dR outPoint, DPoint3dCR inPoint) const
 Multiplies the matrix part of this instance times column vector inPoint. More...
 
void MultiplyMatrixOnly (DPoint3dR point) const
 Multiplies the matrix part of this instance times column vector point and replaces point with the result. More...
 
void MultiplyTransposeMatrixOnly (DPoint3dR point, double x, double y, double z) const
 Multiplies the row vector constructed from components x,y,z times the matrix part of this instance. More...
 
void MultiplyTransposeMatrixOnly (DPoint3dR point) const
 Multiplies the row vector point times the matrix part of this instance, and replaces point with the result. More...
 
void MultiplyTransposeMatrixOnly (DPoint3dR outPoint, DPoint3dCR inPoint) const
 Multiplies the row vector inPoint times the matrix part of this instance. More...
 
void Multiply (DPoint2dR result, DPoint2dCR point) const
 Returns the product of a transform times a point, using only the leading 2x2 part of the matrix part. More...
 
void Multiply (DPoint2dP outPoint, DPoint2dCP inPoint, int numPoint) const
 Multiplies this instance times each column vector in inPoint and places the resulting points in outPoint. More...
 
void Multiply (DPoint3dR result, DPoint2dCR point) const
 Returns the product of a transform times a point, using only the leading 2x3 part of the matrix part. More...
 
void Multiply (DPoint3dP outPoint, DPoint2dCP inPoint, int numPoint) const
 Multiplies this instance times each column vector in inPoint and places the resulting points in outPoint. More...
 
void Multiply (DPoint2dR result, DPoint3dCR point) const
 Returns the product of a transform times a point, using only the leading xy rows (but xyz columns) of the transform. More...
 
void Multiply (DPoint2dP outPoint, DPoint3dCP inPoint, int numPoint) const
 Multiplies this instance times each column vector in inPoint and places the x and y components of the resulting points in outPoint. More...
 
void Multiply (DPoint4dR result, DPoint4dCR point) const
 Returns the product of a transform times a homogeneous point. More...
 
void Multiply (DPoint4dP outPoint, DPoint4dCP inPoint, int numPoint) const
 Multiplies this instance times each column vector in inPoint and places the resulting points in outPoint. More...
 
void MultiplyWeighted (DPoint3dR point, double weight) const
 Multiplies a "weighted point" in place. More...
 
void MultiplyWeighted (DPoint3dP outPoint, DPoint3dCP inPoint, const double *pWeight, int numPoint) const
 Multiplies an array of "weighted points" in place. More...
 
bool Solve (DPoint3dR outPoint, DPoint3dCR inPoint) const
 Solves the linear system Tx=b, where T is this instance, b is the input point and x is the output point. More...
 
bool SolveArray (DPoint3dP outPoint, DPoint3dCP inPoint, int numPoints) const
 Solves the linear systems TX=B, where T is this instance, B is the matrix of numPoints input points and X is the matrix of numPoints output points. More...
 
void Multiply (DRange3dR outRange, DRange3dCR inRange) const
 Computes the 8 corner points of the range cube defined by the two points of pRange, multiplies pTransform times each point, and computes the twopoint range limits (min max) of the resulting rotated box. More...
 
void Multiply (DEllipse3dR inoutEllipse) const
 Trasnform an ellipse. More...
 
void Multiply (DEllipse3dR outEllipse, DEllipse3dCR inEllipse) const
 Trasnform an ellipse. More...
 
bool Multiply (DPlane3dR inoutPlane) const
 Trasnform a plane. More...
 
bool Multiply (DPlane3dR outPlane, DPlane3dCR inPlane) const
 Trasnform an plane. More...
 
void Multiply (DSegment3dR inoutSegment) const
 Trasnform a segment. More...
 
void Multiply (DSegment3dR outSegment, DSegment3dCR inSegment) const
 Trasnform an segment. More...
 
void Multiply (DRay3dR inoutRay) const
 Trasnform a ray. More...
 
void Multiply (DRay3dR outRay, DRay3dCR inRay) const
 Trasnform an ray. More...
 
bool TransformImplicitPlane (double &aOut, double &bOut, double &cOut, double &dOut, double a, double b, double c, double d) const
 Transform the a,b,c,d components for an implicit plane. More...
 
void MultiplyWeighted (bvector< DPoint3d > &weightedXYZOut, bvector< DPoint3d >const &weightedXYZIn, bvector< double > const *weights) const
 Multiply weighted points. More...
 
void Multiply (bvector< DPoint4d > &xyzwOut, bvector< DPoint4d > const &xyzwIn) const
 Multiply weighted points.,wy,wz> parts but does not affect the weights. More...
 
void Multiply (bvector< DPoint3d > &xyzOut, bvector< DPoint3d > const &xyzIn) const
 Mutliply 3D points. More...
 
void Multiply (bvector< DPoint2d > &xyOut, bvector< DPoint2d > const &xyIn) const
 Mutliply 2D points. More...
 
void Multiply (bvector< DPoint3d > &xyzOut, bvector< DPoint2d > const &xyIn) const
 Mutliply 3D points. More...
 
void Multiply (bvector< DPoint2d > &xyOut, bvector< DPoint3d > const &xyzIn) const
 Mutliply 3D points. More...
 
bool SolveArray (bvector< DPoint3d > &xyzOut, bvector< DPoint3d >const &xyzIn) const
 Solve {transform * xyzOut[i] = xyzIn[i]} for each point in the arrays. More...
 
bool IsIdentity () const
 Returns true if the transform is the identity transform. More...
 
bool IsRigid () const
 Returns true if the matrix part of a transform is a rigid body rotation, i.e. More...
 
bool IsRigidScale (double &scale) const
 Returns true if the matrix part of a transform is a rigid body rotation, i.e. More...
 
bool IsNearRigidScale (TransformR dest, int primaryAxis=0, double tolerance=1.0e-6) const
 Clean up a transform that is close to a pure rotate and scale. More...
 
bool IsPlanar (DVec3dCR normal) const
 Returns true if transformation effects are entirely within the plane with given normal. More...
 
bool IsTranslate (DPoint3dR translation) const
 Returns true if the transform is a simple translation. More...
 
bool IsUniformScale (DPoint3dR fixedPoint, double &scale) const
 Returns true if the transform is a uniform scale with scale factor other than 1.0. More...
 
bool IsRotateAroundLine (DPoint3dR fixedPoint, DVec3dR directionVector, double &radians) const
 Returns true if the transform is a non-zero rotation around a line. More...
 
bool IsMirrorAboutPlane (DPoint3dR planePoint, DVec3dR unitNormal) const
 Returns true if the transform is a mirror with respect to a plane. More...
 
bool IsUniformScaleAndRotateAroundLine (DPoint3dR fixedPoint, DVec3dR directionVector, double &radians, double &scale) const
 Returns true if the transform is a uniform scale combined with a rotation. More...
 
bool GetAnyFixedPoint (DPoint3dR fixedPoint) const
 Compute any single point that remains unchanged by action of a transform. More...
 
bool GetFixedLine (DPoint3dR fixedPoint, DVec3dR directionVector) const
 Compute the line (if any) of points that are not affected by this transformation. More...
 
bool GetFixedPlane (DPoint3dR fixedPoint, DVec3dR planeVectorX, DVec3dR planeVectorY) const
 Compute the plane (if any) of points that are not affected by this transformation. More...
 
bool GetFixedPlane (TransformR residualTransform, TransformR mirrorTransform, DPoint3dR planePoint, DVec3dR planeNormal) const
 Factor a combination of a mirror part and a non-mirror part, attempting to use a common fixed point for the two parts. More...
 
void TranslateInLocalCoordinates (TransformCR in, double x, double y, double z)
 Sets this instance to a transformation that has the same matrix part as transform in and a translation part that is the SUM of the translation part of in plus the product of the matrix part of in times the given point. More...
 
void InitFromPrincipleAxisRotations (TransformCR inTransform, double xrot, double yrot, double zrot)
 Sets this instance to the transformation obtained by premultiplying inTransform by 3 matrix rotations about principle axes, given by the angles xrot, yrot and zrot. More...
 
void ScaleMatrixColumns (TransformCR transform, double xscale, double yscale, double zscale)
 Scale the columns of the matrix part by respective factors. More...
 
void ScaleMatrixColumns (double xscale, double yscale, double zscale)
 Scale the columns (in place) of the matrix part by respective factors. More...
 
void ScaleMatrixRows (TransformCR transform, double xscale, double yscale, double zscale)
 Scale the rows of the matrix part by respective factors. More...
 
void ScaleCompleteRows (TransformCR transform, double xscale, double yscale, double zscale)
 Scale the complete rows by respective factors. More...
 
void MultiplyTranslationTransform (DVec3dCR translationIn, double scaleFactor, TransformCR transformIn)
 Multiply by a translation "from the left": result = (Identity , scaled translationIn) * transformIn. More...
 
void MultiplyTransformTranslation (TransformCR transformIn, DVec3dCR translationIn, double scaleFactor)
 Multiply by a translation "from the left": result = transformIn * (Identity , scaled translationIn) More...
 
void ScaleDoubleArrayByXColumnMagnitude (double *data, int n) const
 scale all values in an array of doubles by the magnitude of a specified column of the matrix. More...
 
void OffsetPointByColumn (DPoint3dR out, DPoint3dCR in, int i) const
 Adds column i of the matrix part of this instance to point in and places the result in out. More...
 

Static Public Member Functions

static Transform FromIdentity ()
 returns an identity transformation, i.e. More...
 
static Transform From (RotMatrixCR matrix)
 Returns a transformation with the given matrix part and a zero translation part. More...
 
static Transform From (RotMatrixCR matrix, DPoint3dCR translation)
 Returns a transformation with the given matrix and translation parts. More...
 
static Transform From (DPoint3dCR translation)
 Returns a transformation with identity matrix part and given translation part. More...
 
static Transform FromMatrixAndFixedPoint (RotMatrixCR matrix, DPoint3dCR origin)
 Returns a transformation with given matrix part, and translation part computed from the matrix and a given fixed point. More...
 
static Transform From (double x, double y, double z)
 Returns a transformation with identity matrix part and translation part given as x, y, and z components. More...
 
static Transform FromRowValues (double x00, double x01, double x02, double tx, double x10, double x11, double x12, double ty, double x20, double x21, double x22, double tz)
 Returns a transformation copying the double values directly into the rows of this instance. More...
 
static Transform FromOriginAndBearingXY (DPoint3dCR origin, double bearingRadians)
 Returns a transformation with ul> li>translation xyz are the origin li>xAxis in direction of bearing radians (parallel to xy plane) li>yAxis perpenedicular to xAxis and also parallel to the xy plane. More...
 
static Transform FromOriginAndXVector (DPoint2dCR origin, DVec2dCR xVector)
 Returns a transform with given origin and xVector. More...
 
static bool TryRangeMapping (DRange2dCR sourceRange, DRange2dCR destRange, TransformR transform)
 Returns a transformation that maps corners of the source range to corners of the destination range. More...
 
static Transform FromLineAndRotationAngle (DPoint3dCR point0, DPoint3dCR point1, double radians)
 Returns a transformation of rotation about a specified line. More...
 
static Transform FromAxisAndRotationAngle (DRay3dCR axis, double radians, TransformR derivativeTransform)
 Returns a transformation of rotation about a specified ray, and also its derivative with respect to the angle. More...
 
static Transform FromAxisAndRotationAngle (DRay3dCR axis, double radians)
 Returns a transformation of rotation about a specified ray. More...
 
static Transform FromPrincipleAxisRotations (TransformCR inTransform, double xrot, double yrot, double zrot)
 Sets this instance to the transformation obtained by premultiplying inTransform by 3 matrix rotations about principle axes, given by the angles xrot, yrot and zrot. More...
 
static Transform FromOriginAndVectors (DPoint3dCR origin, DVec3dCR xVector, DVec3dCR yVector, DVec3dCR zVector)
 Returns a transformation with origin at origin, x-axis xVector, y-axis yVector, and z-axis zVector. More...
 
static Transform From4Points (DPoint3dCR origin, DPoint3dCR xPoint, DPoint3dCR yPoint, DPoint3dCR zPoint)
 Returns a transformation with origin at origin, x-axis from origin to xPoint, y-axis from origin to yPoint, and z-axis from origin to zPoint. More...
 
static Transform FromPlaneOf3Points (DPoint3dCR origin, DPoint3dCR xPoint, DPoint3dCR yPoint)
 Returns a transformation with origin at origin, x-axis from origin to xPoint, y-axis from origin to yPoint, and z-axis equal to the cross product of x and y axes. More...
 
static Transform FromPlaneOf3PointsZeroZ (DPoint3dCR origin, DPoint3dCR xPoint, DPoint3dCR yPoint)
 Returns a transformation with origin at origin, x-axis from origin to xPoint, y-axis from origin to yPoint, and z-axis all zeros. More...
 
static Transform FromFixedPointAndScaleFactors (DPoint3dCR origin, double xScale, double yScale, double zScale)
 Returns a transformation with x,y,z scales around a fixed point. More...
 
static Transform FromPlaneNormalToLine (DPoint3dCR origin, DPoint3dCR xPoint, int axisId, bool normalize)
 Returns a (possibly skewed) transformation with origin origin, the axis axisId towards xPoint, and other axes perpendicular. More...
 
static Transform From2Points (DPoint2dCR origin, DPoint2dCR xPoint, int axisId, bool normalize)
 Returns a transformation in the xy-plane with origin origin, axis axisId towards xPoint, and the other axis perpendicular. More...
 
static Transform FromProduct (TransformCR transformA, TransformCR transformB)
 Returns the product of two transforms. More...
 
static Transform FromProduct (TransformCR transformA, TransformCR transformB, TransformCR transformC)
 Returns the product of thre transforms. More...
 
static Transform FromProduct (RotMatrixCR matrixA, TransformCR transformB)
 Returns the product of a rotmatrix and a transform. (The rotmatrix is treated as a transform with zero translation) More...
 
static Transform FromProduct (TransformCR transformA, RotMatrixCR matrixB)
 Returns the product of a transform and rotmatrix. (The rotmatrix is treated as a transform with zero translation) More...
 
static bool InitForwardAndInverseFromAxesAndOrigin (TransformR localToWorld, TransformR worldToLocal, RotMatrixCR axes, DPoint3dCR origin)
 Construct transforms between local and world for given origin and axis directions. More...
 
static void CorrectCoordinateFrameXYRange (TransformR localToWorld, TransformR worldToLocal, DRange3dR localRange, LocalCoordinateSelect frameType, TransformP appliedTransformOldLocalToNewLocal=NULL)
 Input transforms placed "within" caller's geoemtry so that the geometry range satisfies origin and scaling requirements indicatd by frame type. More...
 

Public Attributes

double form3d [3][4]
 3x4 matrix. Leading 3x3 part is 3x3 matrix commonly called "rotation part"; final column is commonly called "translation part". More...
 

Detailed Description

3x4 matrix for defining coordinate frames and affine transformations.

Member Function Documentation

double ColumnXMagnitude ( ) const

Return magnitude of X column. This is commonly considered as the scale factor of the transform.

void Copy ( TransformCR  source)

Returns a copy of a transformation.

Parameters
[in]sourceThe source transform
static void CorrectCoordinateFrameXYRange ( TransformR  localToWorld,
TransformR  worldToLocal,
DRange3dR  localRange,
LocalCoordinateSelect  frameType,
TransformP  appliedTransformOldLocalToNewLocal = NULL 
)
static

Input transforms placed "within" caller's geoemtry so that the geometry range satisfies origin and scaling requirements indicatd by frame type.

Expected usage is that a local coordinate frame is placed on some geometry and the range of the geometry is them computed within that local system. The coordinate frame then needs some combination of (a) move origin to lower left of the range, (b) rescale axes so that one or both of x,y directions scale to 01.

Parameters
[in,out]localToWorldlocal to world transformation to modify.
[in,out]worldToLocalworld to lcoal transformation to modify.
[in,out]localRangerange of subject data.
[in]frameTypeidentifies target scaling and origin.
[out]appliedTransformOldLocalToNewLocal(optional) the transfrom applied to modify initial local geometry to final local geometry
double Determinant ( ) const

Return the determinant of the matrix part.

static Transform From ( RotMatrixCR  matrix)
static

Returns a transformation with the given matrix part and a zero translation part.

Parameters
[in]matrixThe matrix part
static Transform From ( RotMatrixCR  matrix,
DPoint3dCR  translation 
)
static

Returns a transformation with the given matrix and translation parts.

Parameters
[in]matrixThe matrix part
[in]translationThe translation part
static Transform From ( DPoint3dCR  translation)
static

Returns a transformation with identity matrix part and given translation part.

Parameters
[in]translationThe translation part
static Transform From ( double  x,
double  y,
double  z 
)
static

Returns a transformation with identity matrix part and translation part given as x, y, and z components.

Parameters
[in]xThe x-coordinate of translation part
[in]yThe y-coordinate of translation part
[in]zThe z-coordinate of translation part
static Transform From2Points ( DPoint2dCR  origin,
DPoint2dCR  xPoint,
int  axisId,
bool  normalize 
)
static

Returns a transformation in the xy-plane with origin origin, axis axisId towards xPoint, and the other axis perpendicular.

If normalize is false, both axes have length equal to the distance between origin and xPoint.

Parameters
[in]origin
[in]xPointThe target point of axis axisId of coordinate system
[in]axisIdThe axis (x=0, y=1) that points from origin to xPoint
[in]normalizetrue to have coordinate system normalized
static Transform From4Points ( DPoint3dCR  origin,
DPoint3dCR  xPoint,
DPoint3dCR  yPoint,
DPoint3dCR  zPoint 
)
static

Returns a transformation with origin at origin, x-axis from origin to xPoint, y-axis from origin to yPoint, and z-axis from origin to zPoint.

All axes are unnormalized. There is no effort to detect zero length axes or degenerate points that define only a line or plane but not a full coordinate system. The axes may be skewed.

Parameters
[in]originThe origin of transformed coordinates
[in]xPointThe 100 point of transformed coordinates
[in]yPointThe 010 point of transformed coordinates
[in]zPointThe 001 point of transformed coordinates
static Transform FromAxisAndRotationAngle ( DRay3dCR  axis,
double  radians,
TransformR  derivativeTransform 
)
static

Returns a transformation of rotation about a specified ray, and also its derivative with respect to the angle.

Parameters
[in]axisaxis of rotation
[in]radiansThe rotation angle
derivativeTransformtransform mapping rotated point (anywhere) to direction vector at its destination.
static Transform FromAxisAndRotationAngle ( DRay3dCR  axis,
double  radians 
)
static

Returns a transformation of rotation about a specified ray.

Parameters
[in]axisaxis of rotation
[in]radiansThe rotation angle
[in]radiansThe rotation angle
static Transform FromFixedPointAndScaleFactors ( DPoint3dCR  origin,
double  xScale,
double  yScale,
double  zScale 
)
static

Returns a transformation with x,y,z scales around a fixed point.

Parameters
[in]originThe fixed point.
[in]xScalex direction scale factor.
[in]yScaley direction scale factor.
[in]zScalez direction scale factor.
static Transform FromIdentity ( )
static

returns an identity transformation, i.e.

zero translation part and identity matrix part.

static Transform FromLineAndRotationAngle ( DPoint3dCR  point0,
DPoint3dCR  point1,
double  radians 
)
static

Returns a transformation of rotation about a specified line.

Parameters
[in]point0The start point of the line
[in]point1The end point of the line
[in]radiansThe rotation angle
static Transform FromMatrixAndFixedPoint ( RotMatrixCR  matrix,
DPoint3dCR  origin 
)
static

Returns a transformation with given matrix part, and translation part computed from the matrix and a given fixed point.

This translation part is generally different from the fixed point itself. The resulting transformation will leave the fixed point unchanged and apply whatever effects are contained in the matrix as if the fixed point is the origin.

Parameters
[in]matrixThe matrix part
[in]originThe point that is to remain fixed when multiplied by the transformation.
static Transform FromOriginAndBearingXY ( DPoint3dCR  origin,
double  bearingRadians 
)
static

Returns a transformation with ul> li>translation xyz are the origin li>xAxis in direction of bearing radians (parallel to xy plane) li>yAxis perpenedicular to xAxis and also parallel to the xy plane.

li>zAxis is global (0,0,1) ul>

static Transform FromOriginAndVectors ( DPoint3dCR  origin,
DVec3dCR  xVector,
DVec3dCR  yVector,
DVec3dCR  zVector 
)
static

Returns a transformation with origin at origin, x-axis xVector, y-axis yVector, and z-axis zVector.

All axes are unnormalized. There is no effort to detect zero length axes or degenerate points that define only a line or plane but not a full coordinate system. The axes may be skewed.

Parameters
[in]originThe origin of transformed coordinates
[in]xVectorThe 100 point of transformed coordinates
[in]yVectorThe 010 point of transformed coordinates
[in]zVectorThe 001 point of transformed coordinates
static Transform FromOriginAndXVector ( DPoint2dCR  origin,
DVec2dCR  xVector 
)
static

Returns a transform with given origin and xVector.

The yVector is a CCW perpendicular to the xVector (with the same length) The zVecotor is a unitZ.

static Transform FromPlaneNormalToLine ( DPoint3dCR  origin,
DPoint3dCR  xPoint,
int  axisId,
bool  normalize 
)
static

Returns a (possibly skewed) transformation with origin origin, the axis axisId towards xPoint, and other axes perpendicular.

If normalize is false, all axes have length equal to the distance between the two origin and xPoint. The axes may be skewed.

Parameters
[in]originThe origin of coordinate system
[in]xPointThe target point of axis axisId of coordinate system
[in]axisIdThe axis that points from origin to xPoint
[in]normalizetrue to have coordinate system normalized
static Transform FromPlaneOf3Points ( DPoint3dCR  origin,
DPoint3dCR  xPoint,
DPoint3dCR  yPoint 
)
static

Returns a transformation with origin at origin, x-axis from origin to xPoint, y-axis from origin to yPoint, and z-axis equal to the cross product of x and y axes.

All axes are unnormalized. There is no effort to detect zero length axes or degenerate points that define only a line or plane but not a full coordinate system.

Parameters
[in]originThe origin of coordinate system
[in]xPointThe 100 point of coordinate system
[in]yPointThe 010 point of coordinate system
static Transform FromPlaneOf3PointsZeroZ ( DPoint3dCR  origin,
DPoint3dCR  xPoint,
DPoint3dCR  yPoint 
)
static

Returns a transformation with origin at origin, x-axis from origin to xPoint, y-axis from origin to yPoint, and z-axis all zeros.

All axes are unnormalized. There is no effort to detect zero length axes or degenerate points that define only a line or plane but not a full plane.

Parameters
[in]originThe origin of coordinate system
[in]xPointThe 100 point of coordinate system
[in]yPointThe 010 point of coordinate system
static Transform FromPrincipleAxisRotations ( TransformCR  inTransform,
double  xrot,
double  yrot,
double  zrot 
)
static

Sets this instance to the transformation obtained by premultiplying inTransform by 3 matrix rotations about principle axes, given by the angles xrot, yrot and zrot.

inTransform may be the same as this instance. Symbolically, given transform M and rotation matrices X,Y,Z, the resulting transform is X*Y*Z*M

Parameters
[in]inTransformThe base transformation
[in]xrotThe x axis rotation, in radians
[in]yrotThe y axis rotation, in radians
[in]zrotThe z axis rotation, in radians
static Transform FromProduct ( TransformCR  transformA,
TransformCR  transformB 
)
static

Returns the product of two transforms.

static Transform FromProduct ( TransformCR  transformA,
TransformCR  transformB,
TransformCR  transformC 
)
static

Returns the product of thre transforms.

static Transform FromProduct ( RotMatrixCR  matrixA,
TransformCR  transformB 
)
static

Returns the product of a rotmatrix and a transform. (The rotmatrix is treated as a transform with zero translation)

static Transform FromProduct ( TransformCR  transformA,
RotMatrixCR  matrixB 
)
static

Returns the product of a transform and rotmatrix. (The rotmatrix is treated as a transform with zero translation)

static Transform FromRowValues ( double  x00,
double  x01,
double  x02,
double  tx,
double  x10,
double  x11,
double  x12,
double  ty,
double  x20,
double  x21,
double  x22,
double  tz 
)
static

Returns a transformation copying the double values directly into the rows of this instance.

Parameters
[in]x00The (0,0) entry of the matrix (row, column)
[in]x01The (0,1) entry
[in]x02The (0,2) entry
[in]txThe x-coordinate of the translation part
[in]x10The (1,0) entry
[in]x11The (1,1) entry
[in]x12The (1,2) entry
[in]tyThe y-coordinate of the translation part
[in]x20The (2,0) entry
[in]x21The (2,1) entry
[in]x22The (2,2) entry
[in]tzThe z-coordinate of the translation part
void Get4Points ( DPoint3dR  point0,
DPoint3dR  point1,
DPoint3dR  point2,
DPoint3dR  point3 
) const

Sets point0 to the origin (translation part), and sets point1, point2 point3 to the x, y and z points (translations of columns of matrix part by origin) from this instance.

Parameters
[out]point0origin of transform coordinates
[out]point1100 point of transform coordinates
[out]point2010 point of transform coordinates
[out]point3001 point of transform coordinates
void Get4Points ( DPoint3dP  array) const

Sets the four points in array to the origin (translation part), x, y and z points (translations of columns of matrix part by origin) from this instance.

Parameters
[out]arrayorigin, 100, 010, 001 points as an array
bool GetAnyFixedPoint ( DPoint3dR  fixedPoint) const

Compute any single point that remains unchanged by action of a transform.

Note that a pure translation has no fixed points, while any other transformation does.

Parameters
[out]fixedPointPoint that is not changed by the transformation.
Returns
true if the transformation has a fixed point.
bool GetFixedLine ( DPoint3dR  fixedPoint,
DVec3dR  directionVector 
) const

Compute the line (if any) of points that are not affected by this transformation.

Returns false if the fixed point set for the transform is empty, a single point, a plane, or all points.

Parameters
[out]fixedPointA point on the line.
[out]directionVectorvector along the line.
Returns
true if the transformation has a fixed point.
bool GetFixedPlane ( DPoint3dR  fixedPoint,
DVec3dR  planeVectorX,
DVec3dR  planeVectorY 
) const

Compute the plane (if any) of points that are not affected by this transformation.

Returns false if the fixed point set for the transform is empty, a single point, a line, or all points.

Parameters
[out]fixedPointA point on the line.
[out]planeVectorXa unit vector in the plane.
[out]planeVectorYanother unit vector in the plane, perpendicular to pDirectionVectorX.
Returns
true if the transformation has a fixed point.
bool GetFixedPlane ( TransformR  residualTransform,
TransformR  mirrorTransform,
DPoint3dR  planePoint,
DVec3dR  planeNormal 
) const

Factor a combination of a mirror part and a non-mirror part, attempting to use a common fixed point for the two parts.

Equationally, the old transform T0 becomes

           T0 = T1 * M

where M is the mirror, and T1 is a mirror-free transform. The mirror transform is returned in both matrix form and as plane point with normal. In an order of operations view, a point X is transformed as

           T0 * X = T1 * M * X

That is, X mirrored first, followed by rotation and scaling in the residual transform.

Parameters
[out]residualTransformthe residual transform.
[out]mirrorTransformthe mirror transform.
[out]planePointA fixed point of the mirror transform.
[out]planeNormalUnit normal for the mirror plane.
Returns
false if the transform has no mirror effects. In this case the mirror transform is the identity, the residual transform is the original transform, and the fixed point and normal are both zero.
double GetFromMatrixByRowAndColumn ( int  row,
int  col 
) const

Returns a value from a specified row and column of the matrix part of the transformation.

Parameters
[in]rowThe index of row to read. Row indices are 0, 1, 2.
[in]colThe index of column to read. Column indices are 0, 1, 2.
void GetMatrix ( RotMatrixR  matrix) const

Returns the matrix part of a transformation.

Parameters
[out]matrixmatrix part of transformation
void GetMatrixColumn ( DVec3dR  column,
int  index 
) const

Returns a column from the matrix part of the transformation.

Parameters
[out]columncolumn of matrix part.
[in]indexcolumn index
void GetMatrixRow ( DVec3dR  row,
int  index 
) const

Returns a row from the matrix part of the transformation.

Parameters
[out]rowrow of matrix part.
[in]indexcolumn index
void GetOriginAndVectors ( DPoint3dR  origin,
DVec3dR  vector0,
DVec3dR  vector1,
DVec3dR  vector2 
) const

Sets origin to the translation part, and sets vector0, vector1 vector2 to the columns of this instance.

Parameters
[out]originorigin of transform coordinates
[out]vector0100 vector of transform coordinates
[out]vector1010 vector of transform coordinates
[out]vector2001 vector of transform coordinates
void GetOriginAndVectors ( DPoint2dR  origin,
DVec2dR  vector0,
DVec2dR  vector1 
) const

Sets origin to the translation part, and sets vector0 and vector1 to the columns of this 2D instance.

Parameters
[out]originorigin of transform coordinates
[out]vector010 vector of transform coordinates
[out]vector101 vector of transform coordinates
double GetPointComponent ( int  row) const

Returns a value from a specified component of the point (translation) part of the transformation.

Parameters
[in]rowThe index of point component to read. Indices are 0, 1, 2 for x, y, z
void GetTranslation ( DPoint3dR  point) const

Returns the translation (point) part of a transformation.

Parameters
[out]pointvector part of transformation
void GetTranslation ( DPoint2dR  point) const

Sets the given point to the x- and y-coordinates of the translation part of this instance.

Parameters
[out]pointtranslation part of transformation
static bool InitForwardAndInverseFromAxesAndOrigin ( TransformR  localToWorld,
TransformR  worldToLocal,
RotMatrixCR  axes,
DPoint3dCR  origin 
)
static

Construct transforms between local and world for given origin and axis directions.

Parameters
[out]localToWorldtransform from local system to world.
[out]worldToLocaltransform from world to local system.
[in]axescoordinate directions of local system (relative to world)
[in]originorigin of local system (in world)
Returns
true if axes were independent
void InitFrom ( RotMatrixCR  matrix)

Returns a transformation with the given matrix part and a zero translation part.

Parameters
[in]matrixThe matrix part
void InitFrom ( RotMatrixCR  matrix,
DPoint3dCR  translation 
)

Returns a transformation with the given matrix and translation parts.

Parameters
[in]matrixThe matrix part
[in]translationThe translation part
void InitFrom ( DPoint3dCR  translation)

Returns a transformation with identity matrix part and given translation part.

Parameters
[in]translationThe translation part
void InitFrom ( double  x,
double  y,
double  z 
)

Returns a transformation with identity matrix part and translation part given as x, y, and z components.

Parameters
[in]xThe x-coordinate of translation part
[in]yThe y-coordinate of translation part
[in]zThe z-coordinate of translation part
bool InitFrom ( DMap4dCR  hMap,
int  inverse 
)

Initializes a Transform from the affine part of one of the matrices in an DMap4d.

If the scale factor is 0, the transform is returned as an identity. If the scale factor is other than 1, the all coefficients are divided by the scale factor. Return code is false if the 4'th row is significantly different from (0,0,0,A).

Parameters
[in]hMapThe source mapping
[in]inversetrue to extract the inverse, false to extract the forward
Returns
true if the DMatrix4d can be collapsed to affine form.
bool InitFrom ( DMatrix4dCR  matrix)

Initialize from first three rows of DMatrix4d, divided by weight entry.

ALWAYS copy the data, even if final row has invalid data.

Returns
false if 4th row is other than 0001
void InitFrom2Points ( DPoint2dCR  origin,
DPoint2dCR  xPoint,
int  axisId,
bool  normalize 
)

Returns a transformation in the xy-plane with origin origin, axis axisId towards xPoint, and the other axis perpendicular.

If normalize is false, both axes have length equal to the distance between origin and xPoint. //! //!

Parameters
[in]originThe origin of coordinate system
[in]xPointThe target point of axis axisId of coordinate system
[in]axisIdThe axis (x=0, y=1) that points from origin to xPoint
[in]normalizetrue to have coordinate system normalized
void InitFrom3Points ( DPoint2dCR  origin,
DPoint2dCR  xPoint,
DPoint2dCR  yPoint 
)

Sets this instance to a transformation in the xy-plane with origin at origin, x-axis from origin to xPoint and y-axis from origin to yPoint.

All axes are unnormalized. There is no effort to detect zero length axes or degenerate points that define a line but not a full coordinate system. The axes may be skewed.

Parameters
[in]originThe origin of transformed coordinates
[in]xPointThe 10 point of transformed coordinates
[in]yPointThe 01 point of transformed coordinates
void InitFrom4Points ( DPoint3dCR  origin,
DPoint3dCR  xPoint,
DPoint3dCR  yPoint,
DPoint3dCR  zPoint 
)

Returns a transformation with origin at origin, x-axis from origin to xPoint, y-axis from origin to yPoint, and z-axis from origin to zPoint.

All axes are unnormalized. There is no effort to detect zero length axes or degenerate points that define only a line or plane but not a full coordinate system. The axes may be skewed.

Parameters
[in]originThe origin of transformed coordinates
[in]xPointThe 100 point of transformed coordinates
[in]yPointThe 010 point of transformed coordinates
[in]zPointThe 001 point of transformed coordinates
void InitFromLineAndRotationAngle ( DPoint3dCR  point0,
DPoint3dCR  point1,
double  radians 
)

Returns a transformation of rotation about a specified line.

Parameters
[in]point0The start point of the line
[in]point1The end point of the line
[in]radiansThe rotation angle
void InitFromMatrixAndFixedPoint ( RotMatrixCR  matrix,
DPoint3dCR  origin 
)

Returns a transformation with given matrix part, and translation part computed from the matrix and a given fixed point.

This translation part is generally different from the fixed point itself. The resulting transformation will leave the fixed point unchanged and apply whatever effects are contained in the matrix as if the fixed point is the origin.

Parameters
[in]matrixThe matrix part
[in]originThe point that is to remain fixed when multiplied by the transformation.
bool InitFromMirrorPlane ( DPoint3dCR  origin,
DVec3dCR  normal 
)

Initialize a transform that mirrors about a plane.

Parameters
[in]originany point on the mirror plane.
[in]normalvector perpendicular to mirror plane
void InitFromOriginAndLengths ( DPoint2dCR  origin,
double  xAxisLength,
double  yAxisLength 
)

Returns a transformation in the xy-plane with origin origin and x,y-axes of given lengths.

The z-coordinate of the origin is zero and the z-axis is unscaled.

Parameters
[in]originorigin of coordinate system
[in]xAxisLengthThe length of x-axis
[in]yAxisLengthThe length of y-axis
void InitFromOriginAndVectors ( DPoint3dCR  origin,
DVec3dCR  xVector,
DVec3dCR  yVector,
DVec3dCR  zVector 
)

Returns a transformation with origin at origin, x-axis xVector, y-axis yVector, and z-axis zVector.

All axes are unnormalized. There is no effort to detect zero length axes or degenerate points that define only a line or plane but not a full coordinate system. The axes may be skewed.

Parameters
[in]originThe origin of transformed coordinates
[in]xVectorThe 100 vector of transformed coordinates
[in]yVectorThe 010 vector of transformed coordinates
[in]zVectorThe 001 vector of transformed coordinates
void InitFromOriginAndVectors ( DPoint2dCR  origin,
DVec2dR  xVector,
DVec2dR  yVector 
)

Sets this instance to a transformation in the xy-plane with origin at origin, x-axis xVector and y-axis yVector.

All axes are unnormalized. There is no effort to detect zero length axes or degenerate points that define a line but not a full coordinate system. The axes may be skewed.

Parameters
[in]originThe origin of transformed coordinates
[in]xVectorThe 10 point of transformed coordinates
[in]yVector01 point of transformed coordinates
void InitFromOriginAngleAndLengths ( DPoint2dCR  origin,
double  xAxisAngleRadians,
double  xAxisLength,
double  yAxisLength 
)

Returns a transformation in the xy-plane with origin origin and x,y-axes of the given lengths rotated counter-clockwise from standard position by the given angle.

The z-coordinate of the origin is zero and the z-axis is unscaled.

Parameters
[in]originorigin of coordinate system
[in]xAxisAngleRadiansThe ccw angle separating x-axis from its standard position
[in]xAxisLengthThe length of x-axis
[in]yAxisLengthThe length of y-axis
bool InitFromOriginXVectorYVectorSquareAndNormalize ( DPoint3dCR  origin,
DVec3dCR  xVector,
DVec3dCR  yVector 
)

Returns a transformation with origin, x axis direction, and xy plane All axes are normalized and perpendicular.

Parameters
[in]originThe origin of transformed coordinates
[in]xVectordirection for x axis
[in]yVector"In plane" direction for y axis.
Returns
true if SquareAndOrthogonalizeColumns succeeds
void InitFromPlaneNormalToLine ( DPoint3dCR  origin,
DPoint3dCR  xPoint,
int  axisId,
bool  normalize 
)

Returns a (possibly skewed) transformation with origin origin, the axis axisId towards xPoint, and other axes perpendicular.

If normalize is false, all axes have length equal to the distance between the two origin and xPoint. The axes may be skewed.

Parameters
[in]originThe origin of coordinate system
[in]xPointThe target point of axis axisId of coordinate system
[in]axisIdThe axis that points from origin to xPoint
[in]normalizetrue to have coordinate system normalized
void InitFromPlaneOf3Points ( DPoint3dCR  origin,
DPoint3dCR  xPoint,
DPoint3dCR  yPoint 
)

Returns a transformation with origin at origin, x-axis from origin to xPoint, y-axis from origin to yPoint, and z-axis equal to the cross product of x and y axes.

All axes are unnormalized. There is no effort to detect zero length axes or degenerate points that define only a line or plane but not a full coordinate system.

Parameters
[in]originThe origin of coordinate system
[in]xPointThe 100 point of coordinate system
[in]yPointThe 010 point of coordinate system
void InitFromPrincipleAxisRotations ( TransformCR  inTransform,
double  xrot,
double  yrot,
double  zrot 
)

Sets this instance to the transformation obtained by premultiplying inTransform by 3 matrix rotations about principle axes, given by the angles xrot, yrot and zrot.

inTransform may be the same as this instance. Symbolically, given transform [M t] and rotation matrices X,Y,Z, the resulting transform is [X*Y*Z*M X*Y*Z*t]

Parameters
[in]inTransformThe base transformation
[in]xrotThe x axis rotation, in radians
[in]yrotThe y axis rotation, in radians
[in]zrotThe z axis rotation, in radians
bool InitFromProjectionToPlane ( DPoint3dCR  origin,
DVec3dCR  normal 
)

Initialize a transform that projects to a plane.

Parameters
[in]originany point on the target plane.
[in]normalvector perpendicular to target plane
void InitFromRowValues ( double  x00,
double  x01,
double  x02,
double  tx,
double  x10,
double  x11,
double  x12,
double  ty,
double  x20,
double  x21,
double  x22,
double  tz 
)

Copies the double values directly into the rows of this instance.

Parameters
[in]x00The (0,0) entry of the matrix (row, column)
[in]x01The (0,1) entry
[in]x02The (0,2) entry
[in]txThe x-coordinate of the translation part
[in]x10The (1,0) entry
[in]x11The (1,1) entry
[in]x12The (1,2) entry
[in]tyThe y-coordinate of the translation part
[in]x20The (2,0) entry
[in]x21The (2,1) entry
[in]x22The (2,2) entry
[in]tzThe z-coordinate of the translation part
bool InitFromScalePerpendicularToPlane ( DPoint3dCR  origin,
DVec3dCR  normal,
double  scale 
)

Initialize a transform that scales around a plane.

Parameters
[in]originany point on the target plane
[in]normalvector perpendicular to target plane.
[in]scalescale factor. (e.g. 0.0 to project onto the plane, -1 to mirror)
void InitIdentity ( )

returns an identity transformation, i.e.

zero translation part and identity matrix part.

Referenced by SolverGeometry::SolverGeometry().

bool InitNormalizedFrameFromOriginXPointYPoint ( DPoint3dCR  origin,
DPoint3dCR  xPoint,
DPoint3dCR  yPoint 
)

Attempt to set up a coordinate frame origin at origin, x-axis from origin to xPoint, y-axis in plane with yPoint, All axes are normalized.

Return false with identity at origin if unable to do cross products.

Parameters
[in]originThe origin of coordinate system
[in]xPointThe 100 point of coordinate system
[in]yPointThe 010 point of coordinate system
void InitProduct ( TransformCR  transform1,
TransformCR  transform2 
)

Returns the product of two transformations.

Symbolically, given transforms [R t] and [S u], return the product transform [R t][S u] = [R*S t+R*u].

Parameters
[in]transform1The first factor
[in]transform2The second factor
void InitProduct ( RotMatrixCR  matrix,
TransformCR  transform 
)

Returns the product of a matrix and a transformation.

The matrix acts like a transformation with a zero point as its translation part.

Parameters
[in]matrixThe first factor (matrix)
[in]transformThe second factor (transform)
void InitProduct ( TransformCR  transform,
RotMatrixCR  matrix 
)

returns the product of a transformation times a matrix, treating the matrix as a transformation with zero as its translation components.

Parameters
[in]transformThe first facpatentor (transform)
[in]matrixThe second factor (matrix)
bool InitUniformScaleApproximation ( TransformCR  transform,
int  primaryAxis,
int  secondaryAxis 
)

Construct a transform which preserves both a primary column directon and a secondary column plane.

Scale all columns to length of primary axis.

Parameters
[in]transformoriginal matrix.
[in]primaryAxisaxis to be retained.
[in]secondaryAxisaxis defining plane to be maintained.
bool InverseOf ( TransformCR  in)

Sets this instance to the inverse transform of in.

in may be the same as this instance. This is a modestly expensive floating point computation (33 multiplies, 14 adds). Symbolically, given transform [R t] return transform [Q Q*(-t)] where Q is the inverse of matrix R.

Parameters
[in]inThe input transformation
Remarks
This is deprecated. Preferred call is {resutl = in.ValidatedInverse ();}
Returns
true if transform is invertible
void InvertRigidBodyTransformation ( TransformCR  in)

Sets this instance to a matrix which is the inverse of in IN THE SPECIAL CASE WHERE in HAS ONLY PURE ROTATION OR MIRRORING IN ITS ROTATIONAL PART.

These special conditions allow the 'inversion' to be done by only a transposition and one matrix-times-point multiplication, rather than the full effort of inverting a general transformation. It is the caller's responsibility to be sure that these special conditions hold. This usually occurs when the caller has just constructed the transform by a sequence of translations and rotations. If the caller has received the matrix from nonverified external sources and therefore does not know if the special conditions apply, the inverseOf method should be used instead. in may be the same as this instance. The specific computations in this special-case inversion are (1) the output transform's translation is the input transform's matrix times the negative of the input transform's translation, and (2) the output transform's matrix part is the tranpose of the input transform's matrix part. Symbolically, given transform [R t] return transform [R^ (R^)*(-t)] where ^ indicates transposition.

Parameters
[in]inThe input transformation (TransformCR)
bool IsEqual ( TransformCR  transform2) const

Returns true if two transforms have exact (bitwise) equality.

Parameters
[in]transform2The second transform
Returns
true if the transforms are identical
bool IsEqual ( TransformCR  transform2,
double  matrixTolerance,
double  pointTolerance 
) const

Returns true if two transformations are equal within tolerance, using separate tolerances for the matrix and point parts.

bool IsIdentity ( ) const

Returns true if the transform is the identity transform.

Returns
true if the transformation is within tolerance of the identity.
bool IsMirrorAboutPlane ( DPoint3dR  planePoint,
DVec3dR  unitNormal 
) const

Returns true if the transform is a mirror with respect to a plane.

Parameters
[out]planePointSome point on the plane.
[out]unitNormalunit vector perpendicular to the plane.
Returns
true if the transformation is a mirror.
bool IsNearRigidScale ( TransformR  dest,
int  primaryAxis = 0,
double  tolerance = 1.0e-6 
) const

Clean up a transform that is close to a pure rotate and scale.

If source is NOT near to a rigid scale, return false and copy to the dest. If near an identity return identity. If nearly perpendicular with scales other than 1, clean preserving the length and direction of the primary axis. This is intended to be used with a crude (e.g. 1.0e-6) reltol to identify old DGN file matrices that are "dirty" by modern standards but were meant to be identity, rotation, or scaled rotations in the UOR era.

Parameters
[in]destresult
[in]primaryAxisaxis whose orientation and direction is preserved.
[in]tolerancerelative tolerance for recognizing near-perpendicular conditions.
bool IsPlanar ( DVec3dCR  normal) const

Returns true if transformation effects are entirely within the plane with given normal.

Parameters
[in]normalThe plane normal
Returns
true if the transform has no effects perpendicular to planes with the given normal.
bool IsRigid ( ) const

Returns true if the matrix part of a transform is a rigid body rotation, i.e.

its transpose is its inverse and it has a positive determinant.

Returns
true if the transformation is rigid (no scale or shear in the matrix part)
bool IsRigidScale ( double &  scale) const

Returns true if the matrix part of a transform is a rigid body rotation, i.e.

its transpose is its inverse and it has a positive determinant.

Parameters
[out]scalescale factor.
Returns
true if the transformation is rigid (no scale or shear in the matrix part)
bool IsRotateAroundLine ( DPoint3dR  fixedPoint,
DVec3dR  directionVector,
double &  radians 
) const

Returns true if the transform is a non-zero rotation around a line.

Parameters
[out]fixedPointa point on the line.
[out]directionVectorvector in the line direction.
[out]radiansrotation angle in radians.
Returns
true if the transformation is a non-zero rotation.
bool IsTranslate ( DPoint3dR  translation) const

Returns true if the transform is a simple translation.

Parameters
[out]translationthe translation vector. Zero of not a translation transform.
Returns
true if the transformation is a pure translation.
bool IsUniformScale ( DPoint3dR  fixedPoint,
double &  scale 
) const

Returns true if the transform is a uniform scale with scale factor other than 1.0.

Parameters
[out]fixedPoint(If function result is true) the (one) point which remains in place in the transformation.
[out]scaleThe scale factor. If the transform is not a scale, this is returned as 1.0.
Returns
true if the transformation is a uniform scale.
bool IsUniformScaleAndRotateAroundLine ( DPoint3dR  fixedPoint,
DVec3dR  directionVector,
double &  radians,
double &  scale 
) const

Returns true if the transform is a uniform scale combined with a rotation.

One, but not both, of the two steps may be null (unit scale or no rotation)

Parameters
[out]fixedPointfixed point of scaling. This is also a point on the line.
[out]directionVectorvector in the direction of the rotation.
[out]radiansrotation angle
[out]scalescale factor.
Returns
true if the transformation has at least one of the scale, rotate effects.
double MatrixColumnMagnitude ( int  i) const

return the magnitude of a column of the matrix.

Parameters
[in]icolumn index. Adjusted cyclically if outside 012
double MaxDiff ( TransformCR  otherTransform) const

Returns the largest absolute value difference between corresponding coefficients.

Parameters
[in]otherTransform
Returns
largest absolute difference between the two transforms
void Multiply ( DPoint3dR  point) const

Multiplies a point by a transform, returning the result in place of the input point.

Parameters
[in,out]pointpoint to be updated
void Multiply ( DPoint3dR  result,
DPoint3dCR  point 
) const

Returns the product of a transform times a point.

Parameters
[out]resultreturned point.
[in]pointThe input point.
void Multiply ( DPoint3dR  point,
double  x,
double  y,
double  z 
) const

Returns the product of a matrix times a point, with the point specified as explict x, y, and z values.

Parameters
[out]pointresult of transformation * point operation
[in]xThe x component of the point
[in]yThe y component of the point
[in]zThe z component of the point
void Multiply ( DPoint3dP  pointArray,
int  numPoint 
) const

Multiplies this instance times each column vector in pointArray and replaces pointArray with the resulting points.

Symbolically, given transform [R t], each returned point is of the form R*p + t, where p is a column vector.

Parameters
[in,out]pointArrayarray of points to be multiplied
[in]numPointThe number of points
void Multiply ( DPoint3dP  outPoint,
DPoint3dCP  inPoint,
int  numPoint 
) const

Multiplies this instance times each column vector in inPoint and places the resulting points in outPoint.

inPoint and outPoint may be the same. Symbolically, given transform [R t], each returned point has the form R*p + t, where p is a column vector.

Parameters
[out]outPointtransformed points
[in]inPointThe input points
[in]numPointThe number of points
void Multiply ( DPoint2dR  result,
DPoint2dCR  point 
) const

Returns the product of a transform times a point, using only the leading 2x2 part of the matrix part.

Parameters
[out]resultreturned point.
[in]pointThe input point.
void Multiply ( DPoint2dP  outPoint,
DPoint2dCP  inPoint,
int  numPoint 
) const

Multiplies this instance times each column vector in inPoint and places the resulting points in outPoint.

inPoint and outPoint may be the same. All z parts (i.e. last row and column) of this instance are ignored.

Parameters
[out]outPointtransformed points
[in]inPointThe input points
[in]numPointThe number of points
void Multiply ( DPoint3dR  result,
DPoint2dCR  point 
) const

Returns the product of a transform times a point, using only the leading 2x3 part of the matrix part.

Parameters
[out]resultreturned point.
[in]pointThe input point.
void Multiply ( DPoint3dP  outPoint,
DPoint2dCP  inPoint,
int  numPoint 
) const

Multiplies this instance times each column vector in inPoint and places the resulting points in outPoint.

Each input point is given a z=0.

Parameters
[out]outPointtransformed points
[in]inPointThe input points
[in]numPointThe number of points
void Multiply ( DPoint2dR  result,
DPoint3dCR  point 
) const

Returns the product of a transform times a point, using only the leading xy rows (but xyz columns) of the transform.

Parameters
[out]resultreturned point.
[in]pointThe input point.
void Multiply ( DPoint2dP  outPoint,
DPoint3dCP  inPoint,
int  numPoint 
) const

Multiplies this instance times each column vector in inPoint and places the x and y components of the resulting points in outPoint.

Parameters
[out]outPointtransformed points
[in]inPointThe input points
[in]numPointThe number of points
void Multiply ( DPoint4dR  result,
DPoint4dCR  point 
) const

Returns the product of a transform times a homogeneous point.

(Transform is extended by a 0001 row.)

Parameters
[out]resultreturned point.
[in]pointThe input point.
void Multiply ( DPoint4dP  outPoint,
DPoint4dCP  inPoint,
int  numPoint 
) const

Multiplies this instance times each column vector in inPoint and places the resulting points in outPoint.

inPoint and outPoint may be the same. Symbolically, given transform [R t], each returned point has the form R*p + t*w (with weight w), where p is a column vector and w is its weight.

Parameters
[out]outPointtransformed points
[in]inPointThe input points
[in]numPointThe number of points
void Multiply ( DRange3dR  outRange,
DRange3dCR  inRange 
) const

Computes the 8 corner points of the range cube defined by the two points of pRange, multiplies pTransform times each point, and computes the twopoint range limits (min max) of the resulting rotated box.

Note that the volume of the rotated box is generally larger than that of the input because the postrotation minmax operation expands the box.

Parameters
[out]outRangerange of transformed cube
[in]inRangeThe any two corners of original cube
void Multiply ( DEllipse3dR  inoutEllipse) const

Trasnform an ellipse.

Parameters
inoutEllipseellipse to transform in place
void Multiply ( DEllipse3dR  outEllipse,
DEllipse3dCR  inEllipse 
) const

Trasnform an ellipse.

Parameters
outEllipsedestination ellipse
inEllipsesource ellipse
bool Multiply ( DPlane3dR  inoutPlane) const

Trasnform a plane.

Parameters
inoutPlaneplane to transform in place
Returns
false if the matrix part is singular.
bool Multiply ( DPlane3dR  outPlane,
DPlane3dCR  inPlane 
) const

Trasnform an plane.

Parameters
outPlanedestination plane
inPlanesource plane
Returns
false if the matrix part is singular.
void Multiply ( DSegment3dR  inoutSegment) const

Trasnform a segment.

Parameters
inoutSegmentsegment to transform in place
void Multiply ( DSegment3dR  outSegment,
DSegment3dCR  inSegment 
) const

Trasnform an segment.

Parameters
outSegmentdestination segment
inSegmentsource segment
void Multiply ( DRay3dR  inoutRay) const

Trasnform a ray.

Parameters
inoutRayray to transform in place
void Multiply ( DRay3dR  outRay,
DRay3dCR  inRay 
) const

Trasnform an ray.

Parameters
outRaydestination ray
inRaysource ray
void Multiply ( bvector< DPoint4d > &  xyzwOut,
bvector< DPoint4d > const &  xyzwIn 
) const

Multiply weighted points.,wy,wz> parts but does not affect the weights.

Parameters
[out]xyzwOuttransformed weighted coordinates.
[in]xyzwInoriginal weighted coordinates.
void Multiply ( bvector< DPoint3d > &  xyzOut,
bvector< DPoint3d > const &  xyzIn 
) const

Mutliply 3D points.

Parameters
[out]xyzOuttransformed points.
[in]xyzInoriginal points.
void Multiply ( bvector< DPoint2d > &  xyOut,
bvector< DPoint2d > const &  xyIn 
) const

Mutliply 2D points.

Parameters
[out]xyOuttransformed points.. z parts from transform are ignored.
[in]xyInoriginal points. Implicitly z=0 for mutliplication.
void Multiply ( bvector< DPoint3d > &  xyzOut,
bvector< DPoint2d > const &  xyIn 
) const

Mutliply 3D points.

Parameters
[out]xyzOuttransformed points.
[in]xyInoriginal points. Implicitly z=0 for mutliplication.
void Multiply ( bvector< DPoint2d > &  xyOut,
bvector< DPoint3d > const &  xyzIn 
) const

Mutliply 3D points.

Parameters
[out]xyOuttransformed points. z row from transform is ignored.
[in]xyzInoriginal points.
void MultiplyMatrixOnly ( DPoint3dR  point,
double  x,
double  y,
double  z 
) const

Multiplies the matrix part of this instance times the column vector constructed from components x,y,z.

Symbolically, given transform [R t] and column vector p, the returned point is R*p.

Parameters
[out]pointresult of matrix * point operation
[in]xThe x component of the point
[in]yThe y component of the point
[in]zThe z component of the point
void MultiplyMatrixOnly ( DPoint3dR  outPoint,
DPoint3dCR  inPoint 
) const

Multiplies the matrix part of this instance times column vector inPoint.

Symbolically, given transform [R t] and column vector p, the returned point is R*p.

Parameters
[out]outPointresult of matrix * point operation
[in]inPointThe point by which matrix is multiplied
void MultiplyMatrixOnly ( DPoint3dR  point) const

Multiplies the matrix part of this instance times column vector point and replaces point with the result.

Symbolically, given transform [R t] and column vector p, the returned point is R*p.

Parameters
[in,out]pointpoint to be updated
void MultiplyTransformTranslation ( TransformCR  transformIn,
DVec3dCR  translationIn,
double  scaleFactor 
)

Multiply by a translation "from the left": result = transformIn * (Identity , scaled translationIn)

Parameters
[in]transformInfull transform for right factor.
[in]translationIntranslation vector for right term
[in]scaleFactorscale factor for translation
void MultiplyTranslationTransform ( DVec3dCR  translationIn,
double  scaleFactor,
TransformCR  transformIn 
)

Multiply by a translation "from the left": result = (Identity , scaled translationIn) * transformIn.

Parameters
[in]translationIntranslation vector for left term
[in]scaleFactorfactor for translation
[in]transformInfull transform for right factor.
void MultiplyTranspose ( DPoint3dP  outPoint,
DPoint3dCP  inPoint,
int  numPoint 
) const

Multiplies this instance times each column vector in inPoint, using the transpose of the matrix part of this instance in the multiplications, and places the resulting points in outPoint.

Symbolically, given transform [R t], each returned point has the equivalent form p*R + t, where p is a row vector. inPoint and outPoint may be the same.

Parameters
[out]outPointtransformed points
[in]inPointThe input points
[in]numPointThe number of points
void MultiplyTranspose ( DPoint3dP  pointArray,
int  numPoint 
) const

Multiplies this instance times each column vector in pointArray, using the transpose of the matrix part of this instance in the multiplications, and replaces pointArray with the resulting points.

Symbolically, given transform [R t], each returned point has the equivalent form p*R + t, where p is a row vector.

Parameters
[in,out]pointArrayarray of points to be multiplied
[in]numPointThe number of points
void MultiplyTransposeMatrixOnly ( DPoint3dR  point,
double  x,
double  y,
double  z 
) const

Multiplies the row vector constructed from components x,y,z times the matrix part of this instance.

Symbolically, given transform [R t] and row vector p, the returned point is p*R.

Parameters
[out]pointresult of point * matrix operation
[in]xThe x component of the point
[in]yThe y component of the point
[in]zThe z component of the point
void MultiplyTransposeMatrixOnly ( DPoint3dR  point) const

Multiplies the row vector point times the matrix part of this instance, and replaces point with the result.

Symbolically, given transform [R t] and row vector p, the returned point is p*R.

Parameters
[in,out]pointpoint to be updated
void MultiplyTransposeMatrixOnly ( DPoint3dR  outPoint,
DPoint3dCR  inPoint 
) const

Multiplies the row vector inPoint times the matrix part of this instance.

Symbolically, given transform [R t] and row vector p, the returned point is p*R.

Parameters
[out]outPointresult of point * matrix operation
[in]inPointThe point which multiplies matrix
void MultiplyWeighted ( DPoint3dR  point,
double  weight 
) const

Multiplies a "weighted point" in place.

That is, the point is input and output as (wx,wy,wz,w) where x,y,z are the cartesian image coordinates.

Parameters
[in,out]pointpoint to be updated
[in]weightThe weight
void MultiplyWeighted ( DPoint3dP  outPoint,
DPoint3dCP  inPoint,
const double *  pWeight,
int  numPoint 
) const

Multiplies an array of "weighted points" in place.

That is, the point is input and output as (wx,wy,wz,w) where x,y,z are the cartesian image coordinates.

Parameters
[in]outPointThe transformed points.
[in]inPointThe original points
[in]pWeightThe weight array. If null, unit weight is used.
[in]numPointnumber of points in arrays
void MultiplyWeighted ( bvector< DPoint3d > &  weightedXYZOut,
bvector< DPoint3d >const &  weightedXYZIn,
bvector< double > const *  weights 
) const

Multiply weighted points.

Remarks
This operation changes the <wx,wy,wz> parts but does not affect the weights.
Parameters
[out]weightedXYZOuttransformed weighted coordinates.
[in]weightedXYZInoriginal weighted coordinates.
[in]weightsweights.
void OffsetPointByColumn ( DPoint3dR  out,
DPoint3dCR  in,
int  i 
) const

Adds column i of the matrix part of this instance to point in and places the result in out.

Parameters
[out]outsum of in and column i
[in]inThe base point for sum
[in]iThe column index of matrix
void ScaleCompleteRows ( TransformCR  transform,
double  xscale,
double  yscale,
double  zscale 
)

Scale the complete rows by respective factors.

(See also scaleMatrixColumns, scaleMatrixRows, which only act on the matrix part)

Parameters
[in]transformThe input transform.
[in]xscaleThe x column scale factor
[in]yscaleThe y column scale factor
[in]zscaleThe z column scale factor
void ScaleDoubleArrayByXColumnMagnitude ( double *  data,
int  n 
) const

scale all values in an array of doubles by the magnitude of a specified column of the matrix.

Parameters
[in]dataarray of doubles.
[in]nnumber of values.
void ScaleMatrixColumns ( TransformCR  transform,
double  xscale,
double  yscale,
double  zscale 
)

Scale the columns of the matrix part by respective factors.

Translation part is unaffected. (See also scaleMatrixRows, scaleTransformRows)

Parameters
[in]transformThe input transform.
[in]xscaleThe x column scale factor
[in]yscaleThe y column scale factor
[in]zscaleThe z column scale factor
void ScaleMatrixColumns ( double  xscale,
double  yscale,
double  zscale 
)

Scale the columns (in place) of the matrix part by respective factors.

Translation part is unaffected. (See also scaleMatrixRows, scaleTransformRows)

Parameters
[in]xscaleThe x column scale factor
[in]yscaleThe y column scale factor
[in]zscaleThe z column scale factor
void ScaleMatrixRows ( TransformCR  transform,
double  xscale,
double  yscale,
double  zscale 
)

Scale the rows of the matrix part by respective factors.

Translation part is unaffected. (See also scaleMatrixColumns, scaleTransformRows)

Parameters
[in]transformThe input transform.
[in]xscaleThe x column scale factor
[in]yscaleThe y column scale factor
[in]zscaleThe z column scale factor
void SetFixedPoint ( DPoint3dCR  point)

Sets the translation part of this instance so that it leaves point point unchanged, i.e.

so that this instance may be interpreted as applying its matrix part as a rotation or scaling about point. Symbolically, given transform [R t] and column vector p, the returned transform is [R p-R*p]. (The prior translation part is destroyed, and does not affect the result in any way.)

Parameters
[in]pointThe point that is to remain fixed when multiplied by the modified transformation
void SetFixedPoint ( DPoint2dCR  point)

Sets the translation part of this instance so that it leaves the given point unchanged, i.e.

so that this instance may be interpreted as applying its matrix part as a rotation or scaling (in the xy-plane) about the point. Symbolically, given transform [R t] and column vector p, the returned transform is [R p-R*p]. (The prior translation part is destroyed, and does not affect the result in any way.)

Parameters
[in]pointThe point that is to remain fixed when multiplied by the modified transformation
void SetMatrix ( RotMatrixCR  matrix)

Overwrites the matrix part of a preexisting transformation.

The translation part is unchanged.

Parameters
[in]matrixThe matrix to insert
void SetTranslation ( DPoint3dCR  point)

Sets the translation part of this instance to point.

The prior translation part is overwritten, and the matrix part is unchanged. Symbolically, if point is u then this instance [R t] becomes the transformation [R u].

Parameters
[in]pointThe vector to insert
void SetTranslation ( DPoint2dCR  point)

Sets the translation part of this instance to the given point.

The prior translation part is overwritten (and z-coord set to zero) and the matrix part is unchanged. Symbolically, if point is u then this instance [R t] becomes the transformation [R u].

Parameters
[in]pointThe point to insert
bool Solve ( DPoint3dR  outPoint,
DPoint3dCR  inPoint 
) const

Solves the linear system Tx=b, where T is this instance, b is the input point and x is the output point.

No simplifying assumptions are made regarding the matrix part of T. Symbolically, if T = [M t], then x = Q (b - t), where Q is the inverse of M (i.e., the system is equivalent to Mx = b - t). inPoint and outPoint may have identical addresses.

Parameters
[out]outPointsolution to system
[in]inPointThe constant point of the system
Returns
false if the matrix part of this instance is singular.
bool SolveArray ( DPoint3dP  outPoint,
DPoint3dCP  inPoint,
int  numPoints 
) const

Solves the linear systems TX=B, where T is this instance, B is the matrix of numPoints input points and X is the matrix of numPoints output points.

No simplifying assumptions are made regarding the matrix part of T. Symbolically, if T = [M t], then for each input/output point i, X[i] = Q (B[i] - t), where Q is the inverse of M (i.e., the i_th system is equivalent to MX[i] = B[i] - t). inPoint and outPoint may have identical addresses.

Parameters
[out]outPointcolumn points of solution matrix to system
[in]inPointThe column points of constant matrix of system
[in]numPointsThe number of input/output points
Returns
false if the matrix part of this instance is singular.
bool SolveArray ( bvector< DPoint3d > &  xyzOut,
bvector< DPoint3d >const &  xyzIn 
) const

Solve {transform * xyzOut[i] = xyzIn[i]} for each point in the arrays.

(i.e. multiply by the inverse array.)

Parameters
[out]xyzOutsolution points.
[in]xyzInoriginal points.
bool TransformImplicitPlane ( double &  aOut,
double &  bOut,
double &  cOut,
double &  dOut,
double  a,
double  b,
double  c,
double  d 
) const

Transform the a,b,c,d components for an implicit plane.

The plane equation format is ax+by+cz=d.

Parameters
[out]aOutx coefficient in transformed plane equation
[out]bOuty coefficient in transformed plane equation
[out]cOutz coefficient in transformed plane equation
[out]dOutconstant coefficient for equation.
[in]aThe x coefficient in plane equation
[in]bThe y coefficient in plane equation
[in]cThe z coefficient in plane equation
[in]dThe constant on right hand side of plane equation
void TranslateInLocalCoordinates ( TransformCR  in,
double  x,
double  y,
double  z 
)

Sets this instance to a transformation that has the same matrix part as transform in and a translation part that is the SUM of the translation part of in plus the product of the matrix part of in times the given point.

If the translation part of in is interpreted as the origin of a coordinate system (whose axis directions and sizes are given by the columns of the matrix part), this instance becomes a coordinate frame with the same axis directions and sizes, but with the origin shifted to point x,y,z of the in system. That is, x,y,z are the local coordinates of the new origin, and the translation part of this instance becomes the global coordinates of the new origin. in may be identical to this instance. Symbolically, if in is the transform [R t] and the local origin coordinates x,y,z are in column vector p, the result is the transformation [R t+R*p].

Parameters
[in]inThe input transformation
[in]xThe x-coordinate of the local origin
[in]yThe y-coordinate of the local origin
[in]zThe z-coordinate of the local origin
static bool TryRangeMapping ( DRange2dCR  sourceRange,
DRange2dCR  destRange,
TransformR  transform 
)
static

Returns a transformation that maps corners of the source range to corners of the destination range.

Returns
false if either range is null or any direction of the sourceRange has zero length.
ValidatedTransform ValidatedInverse ( ) const

Return the inverse of the instance transform.

This is a modestly expensive floating point computation (33 multiplies, 14 adds). Symbolically, given transform [R t] return transform [Q Q*(-t)] where Q is the inverse of matrix R.

Returns
void ZeroTranslation ( )

Sets the translation part of this instance to zero.

The prior translation part is overwritten, and the matrix part is unchanged. Symbolically, this instance [R t] becomes the transformation [R 0].

Member Data Documentation

double form3d[3][4]

3x4 matrix. Leading 3x3 part is 3x3 matrix commonly called "rotation part"; final column is commonly called "translation part".


The documentation for this struct was generated from the following file:

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.