All Frameworks Class Hierarchy This Framework Previous Next Indexes
Mathematics Class CATMathTransformation
CATMathTransformation
Usage: you must use this class as is. You should never derive it.
public class CATMathTransformation
Class representing a transformation in dimension 3.
It is composed of a matrix Matrix,
and of a translation Vector.
Matrix= | a11 | a12 | a13 |
Vector= | u1 |
| a21 | a22 | a23 |
| u2 |
| a31 | a32 | a33 |
| u3 |
Apply transformations by using the * operator.
Available transformations are scaling, translation, reflection,
rotation.
Constructor and Destructor Index
- o
CATMathTransformation()
- Constructs an Identity transformation.
- o
CATMathTransformation(CATAngle&,CATMathLine&)
- Constructs a rotation (radians).
- o
CATMathTransformation(CATMath3x3Matrix&,CATMathVector&)
- Constructs a CATMathTransformation from a CATMath3x3Matrix and a CATMathVector.
- o
CATMathTransformation(CATMathAxis&,CATMathAxis&)
-
- o
CATMathTransformation(CATMathAxis&,double[])
- Constructs an affinity with respect to a given ratio for each direction of a CATMathAxis.
- o
CATMathTransformation(CATMathPlane&)
- Constructs a reflection on a plane.
- o
CATMathTransformation(CATMathPlane&,double)
- Constructs an affinity with respect to a plane.
- o
CATMathTransformation(CATMathPoint&,CATMathVector&)
- Constructs a reflection from a CATMathPoint and a CATMathVector.
- o
CATMathTransformation(CATMathPoint&,double)
- Constructs a scaling.
- o
CATMathTransformation(CATMathTransformation&)
- Copy constructor.
- o
CATMathTransformation(CATMathVector&)
- Constructs a translation.
- o
CATMathTransformation(double,CATMathTransformation&,CATMathTransformation&)
-
- o
CATMathTransformation(double[],CATLONG32)
- Throws an error if iNbCoeff value is not 12 or 16.
Method Index
- o
ComputeInverse(CATMathTransformation&)
- Retrieves the inverse of this CATMathTransformation.
- o
Dump(ostream*)
- Dumps this CATMathTransformation.
- o
GetCoef(double[],CATLONG32)
-
- o
GetCoefficients(double[],CATLONG32)
- Retrieves the coefficients of this CATMathTransformation in an array[] of doubles.
- o
GetMatrix(CATMath3x3Matrix&)
- Retrieves the CATMath3x3Matrix associated with this CATMathTransformation.
- o
GetVector(CATMathVector&)
- Retrieves the CATMathVector associated with this CATMathTransformation.
- o
Inverse(CATMathTransformation&)
-
- o
IsIdentity()
- Tests if this CATMathTransformation is the identity (invariant).
- o
IsIsometry()
- Tests if this CATMathTransformation is an isometry (keeps the distances).
- o
IsReflection(CATMathPlane&)
- Tests if this CATMathTransformation is a reflection and retrieves the reflect plane.
- o
IsRotation(CATAngle&,CATMathLine&,double)
- Tests if this CATMathTransformation is a rotation and retrieves the axis and the
angle in radian.
- o
IsScaling(CATMathPoint&,double&)
- Tests if this CATMathTransformation is a scaling and retrieves the Origin and
the Scale.
- o
IsSimilitude(double&)
- Tests if this CATMathTransformation is a similitude and retrieves the scale.
- o
Set(CATMathAxis&,CATMathAxis&)
- Set an transformation of axis systems.
- o
Set(double,CATMathTransformation&,CATMathTransformation&)
- Set an interpolation of an isometry.
- o
SetCoef(double[],CATLONG32)
-
- o
SetCoefficients(double[],CATLONG32)
- Modifies the coefficients of this CATMathTransformation from an array[] of doubles.
- o
SetMatrix(CATMath3x3Matrix&)
- Sets the matrix of this CATMathTransformation.
- o
SetVector(CATMathVector&)
- Sets the vector of this CATMathTransformation.
Constructor and Destructor
o CATMathTransformation
public CATMathTransformation( | ) |
-
Constructs an Identity transformation.
Matrix= Identity, Vector = (0,0,0)
o CATMathTransformation
-
Constructs a rotation (radians).
- Parameters:
-
- iAngle
- The angle in radians.
- iAxis
- The rotation axis.
o CATMathTransformation
-
Constructs a CATMathTransformation from a CATMath3x3Matrix and a CATMathVector.
o CATMathTransformation
-
- Deprecated:
- V5R15 Set
Constructs a transformation of axis systems.
This transformation transforms, in the global axis system
CATMathOIJK, the coordinates of a point M
into the coordinates of the point TM such that:
M and TM have the same coordinate values
in the axis iFromAxis and iToAxis.
Now, for defining the transformation from iFromAxis to iToAxis, you have to combine
two transformations, in the following way:
CATMathTransformation(iToAxis, CATMathOIJK) * CATMathTransformation(CATMathOIJK, iFromAxis)
o CATMathTransformation
public CATMathTransformation( | const CATMathAxis& | iAxis, |
| const double[] | iRatio) |
-
Constructs an affinity with respect to a given ratio for each direction of a CATMathAxis.
- Parameters:
-
- iAxis
- The three direction of the affinity.
- iRatio
- Array of 3 doubles, giving the ratio in each direction.
o CATMathTransformation
-
Constructs a reflection on a plane.
o CATMathTransformation
public CATMathTransformation( | const CATMathPlane& | iPlane, |
| const double | iScale) |
-
Constructs an affinity with respect to a plane.
o CATMathTransformation
-
Constructs a reflection from a CATMathPoint and a CATMathVector.
o CATMathTransformation
public CATMathTransformation( | const CATMathPoint& | iCenter, |
| const double | iScale) |
-
Constructs a scaling.
o CATMathTransformation
-
Copy constructor.
o CATMathTransformation
-
Constructs a translation.
o CATMathTransformation
-
- Deprecated:
- V5R15 Set
Creates an interpolation of an isometry.
This can be used for simulating intermediate steps of a displacement.
Throws an error if the two transformations are not compatible.
- Parameters:
-
- iFactor
- The ratio of the intermediate step: 0 < iFactor < 1.
o CATMathTransformation
public CATMathTransformation( | const double[] | iCoeff, |
| const CATLONG32 | iNbCoeff | = 12) |
-
Throws an error if iNbCoeff value is not 12 or 16.
Constructs a transformation from an array[] of doubles.
If iNbCoeff=12, the array is:
iCoeff | a11 | a12 | a13 |
u1 |
| a21 | a22 | a23 |
u2 |
| a31 | a32 | a33 |
u3 |
and the coefficients must be given COLUMN by COLUMN.
If iNbCoeff=16, DO NOT USE- the array is:
iCoeff | a11 | a12 | a13 |
u1 |
| a21 | a22 | a23 |
u2 |
| a31 | a32 | a33 |
u3 |
| 0 | 0 | 0 |
1 |
and the coefficients must be given COLUMN by COLUMN.
Methods
o ComputeInverse
-
Retrieves the inverse of this CATMathTransformation.
- Returns:
- S_OK if this CATMathTransformation is invertible, E_FAIL otherwise.
In this last case, oInverse is not modified.
o Dump
public void Dump( | ostream* | iStream | =0L) const |
-
Dumps this CATMathTransformation.
This writes the following lines on the ostream:
Matrix= | | | iA11 | iA12 |
iA13 | | |
| | | iA21 | iA22 |
iA23 | | |
| | | iA31 | iA32 |
iA33 | | |
Translation= | ( | FirstCoord, | SecondCoord, |
ThirdCoord | ) |
- Parameters:
-
- iStream
- A pointer to the output. If 0L, the method dumps
on the cout output.
o GetCoef
public void GetCoef( | double[] | iCoeff, |
| const CATLONG32 | iNbCoeff | = 12) const |
-
- Deprecated:
- V5R15 GetCoefficients
Throws an error if iNbCoeff value is not 12 or 16.
Retrieves the coefficients of this CATMathTransformation in an array[] of doubles.
If iNbCoeff=12, the array is:
oCoeff | a11 | a12 | a13 |
u1 |
| a21 | a22 | a23 |
u2 |
| a31 | a32 | a33 |
u3 |
and the coefficients are given COLUMN by COLUMN.
If iNbCoeff=16, DO NOT USE - and the array is:
oCoeff | a11 | a12 | a13 |
u1 |
| a21 | a22 | a23 |
u2 |
| a31 | a32 | a33 |
u3 |
| 0 | 0 | 0 |
1 |
and the coefficients are given COLUMN by COLUMN.
o GetCoefficients
public HRESULT GetCoefficients( | double[] | iCoeff, |
| const CATLONG32 | iNbCoeff | = 12) const |
-
Retrieves the coefficients of this CATMathTransformation in an array[] of doubles.
If iNbCoeff=12, the array is:
oCoeff | a11 | a12 | a13 |
u1 |
| a21 | a22 | a23 |
u2 |
| a31 | a32 | a33 |
u3 |
and the coefficients are given COLUMN by COLUMN.
If iNbCoeff=16, DO NOT USE - and the array is:
oCoeff | a11 | a12 | a13 |
u1 |
| a21 | a22 | a23 |
u2 |
| a31 | a32 | a33 |
u3 |
| 0 | 0 | 0 |
1 |
and the coefficients are given COLUMN by COLUMN.
- Returns:
- E_FAIL if iNbCoeff value is not 12 or 16, S_OK otherwise.
o GetMatrix
-
Retrieves the CATMath3x3Matrix associated with this CATMathTransformation.
o GetVector
-
Retrieves the CATMathVector associated with this CATMathTransformation.
o Inverse
-
- Deprecated:
- V5R15 ComputeInverse
Retrieves the inverse of this CATMathTransformation.
- Returns:
- TRUE if this CATMathTransformation is invertible, FALSE otherwise.
In this last case, oInverse is not modified.
o IsIdentity
-
Tests if this CATMathTransformation is the identity (invariant).
- Returns:
-
- FALSE
- if it is not the identity.
- TRUE
- if it is the identity.
o IsIsometry
-
Tests if this CATMathTransformation is an isometry (keeps the distances).
return
- FALSE
- if it is not an isometry.
- TRUE
- if it is a direct isometry.
o IsReflection
-
Tests if this CATMathTransformation is a reflection and retrieves the reflect plane.
- Returns:
-
- FALSE
- if it is not a reflection.
- TRUE
- if it is a reflection.
o IsRotation
-
Tests if this CATMathTransformation is a rotation and retrieves the axis and the
angle in radian.
- Returns:
-
- FALSE
- if it is not a rotation.
- TRUE
- if it is a rotation.
o IsScaling
-
Tests if this CATMathTransformation is a scaling and retrieves the Origin and
the Scale.
- Returns:
-
- FALSE
- if it is not a scaling.
- TRUE
- if it is a scaling.
o IsSimilitude
public CATBoolean IsSimilitude( | double& | ioScale) const |
-
Tests if this CATMathTransformation is a similitude and retrieves the scale.
- Returns:
-
- FALSE
- if it is not a similitude.
- TRUE
- if it is a similitude.
o Set
-
Set an transformation of axis systems.
This transformation transforms, in the global axis system
CATMathOIJK, the coordinates of a point M
into the coordinates of the point TM such that:
M and TM have the same coordinate values
in the axis iFromAxis and iToAxis.
Now, for defining the transformation from iFromAxis to iToAxis, you have to combine
two transformations, in the following way:
CATMathTransformation(iToAxis, CATMathOIJK) * CATMathTransformation(CATMathOIJK, iFromAxis)
- Returns:
- E_FAIL if an error occurs, S_OK otherwise.
o Set
-
Set an interpolation of an isometry.
This can be used for simulating intermediate steps of a displacement.
- Parameters:
-
- iFactor
- The ratio of the intermediate step: 0 < iFactor < 1.
- Returns:
- E_FAIL if the two transformations are not compatible, S_OK otherwise.
o SetCoef
public void SetCoef( | const double[] | iCoeff, |
| const CATLONG32 | iNbCoeff | = 12) |
-
- Deprecated:
- V5R15 GetCoefficients
Throws an error if iNbCoeff value is not 12 or 16.
Modifies the coefficients of this CATMathTransformation from an array[] of doubles.
If iNbCoeff=12, the array is:
iCoeff | a11 | a12 | a13 |
u1 |
| a21 | a22 | a23 |
u2 |
| a31 | a32 | a33 |
u3 |
and the coefficients must be given COLUMN by COLUMN.
If iNbCoeff=16, DO NOT USE - the array is:
iCoeff | a11 | a12 | a13 |
u1 |
| a21 | a22 | a23 |
u2 |
| a31 | a32 | a33 |
u3 |
| 0 | 0 | 0 |
1 |
and the coefficients must be given COLUMN by COLUMN.
o SetCoefficients
public HRESULT SetCoefficients( | const double[] | iCoeff, |
| const CATLONG32 | iNbCoeff | = 12) |
-
Modifies the coefficients of this CATMathTransformation from an array[] of doubles.
If iNbCoeff=12, the array is:
iCoeff | a11 | a12 | a13 |
u1 |
| a21 | a22 | a23 |
u2 |
| a31 | a32 | a33 |
u3 |
and the coefficients must be given COLUMN by COLUMN.
If iNbCoeff=16, DO NOT USE - the array is:
iCoeff | a11 | a12 | a13 |
u1 |
| a21 | a22 | a23 |
u2 |
| a31 | a32 | a33 |
u3 |
| 0 | 0 | 0 |
1 |
and the coefficients must be given COLUMN by COLUMN.
- Returns:
- E_FAIL if iNbCoeff value is not 12 or 16, S_OK otherwise.
o SetMatrix
-
Sets the matrix of this CATMathTransformation.
o SetVector
-
Sets the vector of this CATMathTransformation.
This object is included in the file: CATMathTransformation.h
If needed, your Imakefile.mk should include the module: CATMathematics