CFx SDK Documentation  2023 SP0
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
AECECS Class Reference

#include <AECECS.h>

Public Member Functions

 AECECS ()
 
 AECECS (const OdGeMatrix3d &m)
 
 AECECS (const OdGePoint3d &origin, const OdGeVector3d &xAxis, const OdGeVector3d &yAxis, const OdGeVector3d &zAxis)
 
AECECSsetToIdentity ()
 
void validateZero (const OdGeTol &tol=OdGeContext::gTol)
 
AECECS operator* (const AECECS &matrix) const
 
AECECSoperator*= (const AECECS &matrix)
 
AECECSpreMultBy (const AECECS &leftSide)
 
AECECSpostMultBy (const AECECS &rightSide)
 
AECECSsetToProduct (const AECECS &m1, const AECECS &m2)
 
AECECSinvert ()
 
bool isSingular (const OdGeTol &tol=OdGeContext::gTol) const
 
bool operator== (const AECECS &matrix) const
 
bool operator!= (const AECECS &matrix) const
 
bool isEqualTo (const AECECS &matrix, const OdGeTol &tol=OdGeContext::gTol) const
 
bool isUniScaledOrtho (const OdGeTol &tol=OdGeContext::gTol) const
 
bool isScaledOrtho (const OdGeTol &tol=OdGeContext::gTol) const
 
double det () const
 
AECECSsetTranslation (const OdGeVector3d &vect)
 
AECECSsetCoordSystem (const OdGePoint3d &origin, const OdGeVector3d &xAxis, const OdGeVector3d &yAxis, const OdGeVector3d &zAxis)
 
void getCoordSystem (OdGePoint3d &origin, OdGeVector3d &xAxis, OdGeVector3d &yAxis, OdGeVector3d &zAxis) const
 
const OdGePoint3dgetCsOrigin () const
 
const OdGeVector3dgetCsXAxis () const
 
const OdGeVector3dgetCsYAxis () const
 
const OdGeVector3dgetCsZAxis () const
 
AECECSsetToTranslation (const OdGeVector3d &vect)
 
AECECSsetToRotation (double angle, const OdGeVector3d &axis, const OdGePoint3d &center=OdGePoint3d::kOrigin)
 
AECECSsetToScaling (double scale, const OdGePoint3d &center=OdGePoint3d::kOrigin)
 
AECECSsetToScaling (const OdGeScale3d &scale, const OdGePoint3d &center=OdGePoint3d::kOrigin)
 
AECECSsetToMirroring (const OdGePlane &mirrorPlane)
 
AECECSsetToMirroring (const OdGePoint3d &mirrorPoint)
 
AECECSsetToMirroring (const OdGeLine3d &mirrorLine)
 
AECECSsetToProjection (const OdGePlane &projectionPlane, const OdGeVector3d &projectDir)
 
AECECSsetToAlignCoordSys (const OdGePoint3d &fromOrigin, const OdGeVector3d &fromXAxis, const OdGeVector3d &fromYAxis, const OdGeVector3d &fromZAxis, const OdGePoint3d &toOrigin, const OdGeVector3d &toXAxis, const OdGeVector3d &toYAxis, const OdGeVector3d &toZAxis)
 
AECECSsetToWorldToPlane (const OdGeVector3d &normal)
 
AECECSsetToWorldToPlane (const OdGePlane &plane)
 
AECECSsetToPlaneToWorld (const OdGeVector3d &normal)
 
AECECSsetToPlaneToWorld (const OdGePlane &plane)
 
const OdGeVector3dtranslation () const
 
double scale () const
 
double norm () const
 
OdGeMatrix2d convertToLocal (OdGeVector3d &normal, double &elevation) const
 
OdGeMatrix2d convertToLocalXY () const
 
AECECS inverse () const
 
bool inverse (AECECS &inverseMatrix, double tol) const
 
void geMatrix (OdGeMatrix3d &result) const
 
 operator OdGeMatrix3d () const
 
AECECSoperator= (const OdGeMatrix3d &m)
 

Static Public Member Functions

static AECECS translation (const OdGeVector3d &vect)
 
static AECECS rotation (double angle, const OdGeVector3d &axis, const OdGePoint3d &center=OdGePoint3d::kOrigin)
 
static AECECS scaling (double scale, const OdGePoint3d &center=OdGePoint3d::kOrigin)
 
static AECECS scaling (const OdGeScale3d &scale, const OdGePoint3d &center=OdGePoint3d::kOrigin)
 
static AECECS mirroring (const OdGePlane &mirrorPlane)
 
static AECECS mirroring (const OdGePoint3d &mirrorPoint)
 
static AECECS mirroring (const OdGeLine3d &mirrorLine)
 
static AECECS projection (const OdGePlane &projectionPlane, const OdGeVector3d &projectDir)
 
static AECECS alignCoordSys (const OdGePoint3d &fromOrigin, const OdGeVector3d &fromXAxis, const OdGeVector3d &fromYAxis, const OdGeVector3d &fromZAxis, const OdGePoint3d &toOrigin, const OdGeVector3d &toXAxis, const OdGeVector3d &toYAxis, const OdGeVector3d &toZAxis)
 
static AECECS worldToPlane (const OdGeVector3d &normal)
 
static AECECS worldToPlane (const OdGePlane &plane)
 
static AECECS planeToWorld (const OdGeVector3d &normal)
 
static AECECS planeToWorld (const OdGePlane &plane)
 

Public Attributes

OdGePoint3d m_origin
 
OdGeVector3d m_xAxis
 
OdGeVector3d m_yAxis
 
OdGeVector3d m_zAxis
 

Static Public Attributes

static const AECECS kIdentity
 

Detailed Description

This class represents 3D transformation matrices that define affine ( translation, rotation, and/or scaling ) transformations.

Remarks

Library: AecBase

<group TA_Other_Classes>

Definition at line 50 of file AECECS.h.

Constructor & Destructor Documentation

◆ AECECS() [1/3]

AECECS::AECECS ( )
inline

Definition at line 557 of file AECECS.h.

◆ AECECS() [2/3]

AECECS::AECECS ( const OdGeMatrix3d m)
inline

Definition at line 575 of file AECECS.h.

◆ AECECS() [3/3]

AECECS::AECECS ( const OdGePoint3d origin,
const OdGeVector3d xAxis,
const OdGeVector3d yAxis,
const OdGeVector3d zAxis 
)
inline

Definition at line 564 of file AECECS.h.

Member Function Documentation

◆ alignCoordSys()

static AECECS AECECS::alignCoordSys ( const OdGePoint3d fromOrigin,
const OdGeVector3d fromXAxis,
const OdGeVector3d fromYAxis,
const OdGeVector3d fromZAxis,
const OdGePoint3d toOrigin,
const OdGeVector3d toXAxis,
const OdGeVector3d toYAxis,
const OdGeVector3d toZAxis 
)
static

Returns the matrix which maps the coordinate system defined by fromOrigin, fromXAxis, fromYAxis, and fromZAxis, to the coordinate system defined by toOrigin, toXAxis, toYAxis, and toZAxis.

Parameters
fromOrigin[in] Origin of the initial coordinate system.
fromXAxis[in] X-axis of the initial coordinate system.
fromYAxis[in] Y-axis of the initial coordinate system.
fromZAxis[in] Z-axis of the initial coordinate system.
toOrigin[in] Origin of the initial coordinate system.
toXAxis[in] X-axis of the initial coordinate system.
toYAxis[in] Y-axis of the initial coordinate system.
toZAxis[in] Z-axis of the initial coordinate system.

◆ convertToLocal()

OdGeMatrix2d AECECS::convertToLocal ( OdGeVector3d normal,
double &  elevation 
) const

Transforms the plane specified by a normal and an elevation.

Remarks
Returns the normal and elevation of the transformed plane, as well as a 2D transformation matrix for transforming points in the original plane coordinates to the transformed plane coordinates.
Parameters
normal[in/out] Normal to the plane.
elevation[in/out] Elevation of the plane.

◆ convertToLocalXY()

OdGeMatrix2d AECECS::convertToLocalXY ( ) const

◆ det()

double AECECS::det ( ) const

Returns the determinant of this matrix.

◆ geMatrix()

void AECECS::geMatrix ( OdGeMatrix3d result) const
inline

Returns or references entry[row] as matrix[row].

Parameters
row[in] Row. const double* operator[] ( int row ) const { return entry[row]; } double* operator[] ( int row ) { return entry[row]; }

Returns or references entry[row][column] as matrix(row,column).

Parameters
row[in] Row.
column[in] Column. double operator () ( int row, int column ) const { return entry[row][column]; } double& operator () ( int row, int column ) { return entry[row][column]; }

Definition at line 603 of file AECECS.h.

◆ getCoordSystem()

void AECECS::getCoordSystem ( OdGePoint3d origin,
OdGeVector3d xAxis,
OdGeVector3d yAxis,
OdGeVector3d zAxis 
) const

Returns the origin, X-axis, Y-axis, and Z-axis of the coordinate system to which this matrix maps the WCS.

Parameters
origin[out] Receives the origin of the coordinate system.
xAxis[out] Receives the X-axis of the coordinate system.
yAxis[out] Receives the Y-axis of the coordinate system.
zAxis[out] Receives the Z-axis of the coordinate system.

◆ getCsOrigin()

const OdGePoint3d & AECECS::getCsOrigin ( ) const
inline

Returns the origin of the coordinate system to which this matrix maps the WCS.

Definition at line 585 of file AECECS.h.

◆ getCsXAxis()

const OdGeVector3d & AECECS::getCsXAxis ( ) const
inline

Returns the X-axis of the coordinate system to which this matrix maps the WCS.

Definition at line 586 of file AECECS.h.

◆ getCsYAxis()

const OdGeVector3d & AECECS::getCsYAxis ( ) const
inline

Returns the Y-axis of the coordinate system to which this matrix maps the WCS.

Definition at line 587 of file AECECS.h.

◆ getCsZAxis()

const OdGeVector3d & AECECS::getCsZAxis ( ) const
inline

Returns the Z-axis of the coordinate system to which this matrix maps the WCS.

Definition at line 588 of file AECECS.h.

◆ inverse() [1/2]

AECECS AECECS::inverse ( ) const
inline

Returns true if and only if this matrix has an inverse, and the inverse of this matrix.

Parameters
inverseMatrix[out] Receives the inverse matrix
tol[in] Geometric tolerance.

Definition at line 638 of file AECECS.h.

◆ inverse() [2/2]

bool AECECS::inverse ( AECECS inverseMatrix,
double  tol 
) const

◆ invert()

AECECS & AECECS::invert ( )
inline

Sets this matrix to its inverse, and returns a reference to this matrix.

Definition at line 634 of file AECECS.h.

◆ isEqualTo()

bool AECECS::isEqualTo ( const AECECS matrix,
const OdGeTol tol = OdGeContext::gTol 
) const

Returns true if and only if matrix is identical to this one, within the specified tolerance.

Parameters
matrix[in] Matrix to be compared.
tol[in] Geomentric tolerance.

◆ isScaledOrtho()

bool AECECS::isScaledOrtho ( const OdGeTol tol = OdGeContext::gTol) const

Returns true if and only the column vectors of the linear part of this matrix are mutually perpendicular within the specified tolerance.

Parameters
tol[in] Geomentric tolerance.

◆ isSingular()

bool AECECS::isSingular ( const OdGeTol tol = OdGeContext::gTol) const

Returns true if and only if this matrix is singular.

Remarks
A matrix is singular if and only if its determinant == 0. A singular matrix cannot be inverted.

◆ isUniScaledOrtho()

bool AECECS::isUniScaledOrtho ( const OdGeTol tol = OdGeContext::gTol) const

Returns true if and only the columns vectors of the linear part of this matrix are of equal length and mutually perpendicular within the specified tolerance.

Parameters
tol[in] Geomentric tolerance.

◆ mirroring() [1/3]

static AECECS AECECS::mirroring ( const OdGeLine3d mirrorLine)
static

◆ mirroring() [2/3]

static AECECS AECECS::mirroring ( const OdGePlane mirrorPlane)
static

Sets this matrix to the matrix which mirrors about the specified object, and returns a reference to this matrix.

Parameters
mirrorPlane[in] Mirror plane.
mirrorPoint[in] Mirror point.
mirrorLine[in] Mirror line entity.

◆ mirroring() [3/3]

static AECECS AECECS::mirroring ( const OdGePoint3d mirrorPoint)
static

◆ norm()

double AECECS::norm ( ) const

Returns the largest absolute value of the linear part of this matrix.

◆ operator OdGeMatrix3d()

AECECS::operator OdGeMatrix3d ( ) const
inline

Definition at line 607 of file AECECS.h.

◆ operator!=()

bool AECECS::operator!= ( const AECECS matrix) const
inline

Definition at line 133 of file AECECS.h.

◆ operator*()

AECECS AECECS::operator* ( const AECECS matrix) const
inline
Remarks
Returns the product (this matrix) * matrix.

Definition at line 626 of file AECECS.h.

◆ operator*=()

AECECS & AECECS::operator*= ( const AECECS matrix)
inline
Remarks
Sets this matrix to the product (this matrix) * matrix, and returns a reference to this matrix.

Definition at line 630 of file AECECS.h.

◆ operator=()

AECECS & AECECS::operator= ( const OdGeMatrix3d m)
inline

Definition at line 613 of file AECECS.h.

◆ operator==()

bool AECECS::operator== ( const AECECS matrix) const
inline

Definition at line 132 of file AECECS.h.

◆ planeToWorld() [1/2]

static AECECS AECECS::planeToWorld ( const OdGePlane plane)
static

◆ planeToWorld() [2/2]

static AECECS AECECS::planeToWorld ( const OdGeVector3d normal)
static

Returns the matrix which maps the plane coordinate system to the WCS.

Parameters
normal[in] The normal to the plane.
plane[in] The plane.
Remarks
If normal is specified, the origin of the plane is (0,0,0)

◆ postMultBy()

AECECS & AECECS::postMultBy ( const AECECS rightSide)
inline

Sets this matrix to the product (this matrix) * rightSide, and returns a reference to this matrix.

Parameters
rightSide[in] Any 2D matrix

Definition at line 618 of file AECECS.h.

◆ preMultBy()

AECECS & AECECS::preMultBy ( const AECECS leftSide)
inline

Sets this matrix to the product leftSide * (this matrix), and returns a reference to this matrix.

Parameters
leftSide[in] Any 2D matrix

Definition at line 622 of file AECECS.h.

◆ projection()

static AECECS AECECS::projection ( const OdGePlane projectionPlane,
const OdGeVector3d projectDir 
)
static

Returns the matrix which parallel projects onto the specified plane in the specified direction.

Parameters
projectionPlane[in] Projection plane.
projectDir[in] Projection direction.

◆ rotation()

AECECS AECECS::rotation ( double  angle,
const OdGeVector3d axis,
const OdGePoint3d center = OdGePoint3d::kOrigin 
)
inlinestatic

Returns the matrix which rotates by angle about an axis passing through center, and returns a reference to this matrix.

Parameters
angle[in] Rotation angle.
axis[in] Rotation axis.
center[in] Center of rotation.

Definition at line 681 of file AECECS.h.

◆ scale()

double AECECS::scale ( ) const

Returns the matrix which maps the coordinate system defined by fromOrigin, fromXAxis, fromYAxis, and fromZAxis, to the coordinate system defined by toOrigin, toXAxis, toYAxis, and toZAxis.

Get the length of the MAXIMUM column of the 3x3 portion of the matrix.

Returns the scale factor of this matrix.

Remarks
The scale factor is the square root of the longest column vector of the linear part of this matrix.

◆ scaling() [1/2]

AECECS AECECS::scaling ( const OdGeScale3d scale,
const OdGePoint3d center = OdGePoint3d::kOrigin 
)
inlinestatic

Definition at line 691 of file AECECS.h.

◆ scaling() [2/2]

AECECS AECECS::scaling ( double  scale,
const OdGePoint3d center = OdGePoint3d::kOrigin 
)
inlinestatic

Returns the matrix which scales by scale about center, and returns a reference to this matrix.

Parameters
scale[in] Scale factor.
center[in] Center of scaling.

Definition at line 687 of file AECECS.h.

◆ setCoordSystem()

AECECS & AECECS::setCoordSystem ( const OdGePoint3d origin,
const OdGeVector3d xAxis,
const OdGeVector3d yAxis,
const OdGeVector3d zAxis 
)
inline

Sets this matrix to the matrix which maps the WCS to the coordinate system defined by origin, X-axis, Y-axis, and Z-axis, and returns a reference to this matrix.

Parameters
origin[in] Origin of the coordinate system.
xAxis[in] X-axis of the coordinate system.
yAxis[in] Y-axis of the coordinate system.
zAxis[in] Z-axis of the coordinate system.

Definition at line 590 of file AECECS.h.

◆ setToAlignCoordSys()

AECECS& AECECS::setToAlignCoordSys ( const OdGePoint3d fromOrigin,
const OdGeVector3d fromXAxis,
const OdGeVector3d fromYAxis,
const OdGeVector3d fromZAxis,
const OdGePoint3d toOrigin,
const OdGeVector3d toXAxis,
const OdGeVector3d toYAxis,
const OdGeVector3d toZAxis 
)

Sets this matrix to the matrix which maps the coordinate system defined by fromOrigin, fromXAxis, fromYAxis, and fromZAxis, to the coordinate system defined by toOrigin, toXAxis, toYAxis, and toZAxis, and returns a reference to this matrix.

Parameters
fromOrigin[in] Origin of the initial coordinate system.
fromXAxis[in] X-axis of the initial coordinate system.
fromYAxis[in] Y-axis of the initial coordinate system.
fromZAxis[in] Z-axis of the initial coordinate system.
toOrigin[in] Origin of the initial coordinate system.
toXAxis[in] X-axis of the initial coordinate system.
toYAxis[in] Y-axis of the initial coordinate system.
toZAxis[in] Z-axis of the initial coordinate system.

◆ setToIdentity()

AECECS& AECECS::setToIdentity ( )

◆ setToMirroring() [1/3]

AECECS & AECECS::setToMirroring ( const OdGeLine3d mirrorLine)
inline

Definition at line 703 of file AECECS.h.

◆ setToMirroring() [2/3]

AECECS & AECECS::setToMirroring ( const OdGePlane mirrorPlane)
inline

Sets this matrix to the matrix which mirrors about the specified object, and returns a reference to this matrix.

Parameters
mirrorPlane[in] Mirror plane.
mirrorPoint[in] Mirror point.
mirrorLine[in] Mirror line entity.

Definition at line 695 of file AECECS.h.

◆ setToMirroring() [3/3]

AECECS & AECECS::setToMirroring ( const OdGePoint3d mirrorPoint)
inline

Definition at line 699 of file AECECS.h.

◆ setToPlaneToWorld() [1/2]

AECECS& AECECS::setToPlaneToWorld ( const OdGePlane plane)

◆ setToPlaneToWorld() [2/2]

AECECS& AECECS::setToPlaneToWorld ( const OdGeVector3d normal)

Sets this matrix to the matrix which maps the plane coordinate system to the WCS, and returns a reference to this matrix.

Parameters
normal[in] The normal to the plane.
plane[in] The plane.
Remarks
If normal is specified, the origin of the plane is (0,0,0)

◆ setToProduct()

AECECS& AECECS::setToProduct ( const AECECS m1,
const AECECS m2 
)

Sets this matrix to the product matrix1 * matrix2, and returns a reference to this matrix.

Parameters
matrix1[in] Any 2D matrix
matrix2[in] Any 2D matrix

◆ setToProjection()

AECECS & AECECS::setToProjection ( const OdGePlane projectionPlane,
const OdGeVector3d projectDir 
)
inline

Sets this matrix to the matrix which parallel projects onto the specified plane in the specified directionm and returns a reference to this matrix.

Parameters
projectionPlane[in] Projection plane.
projectDir[in] Projection direction.

Definition at line 661 of file AECECS.h.

◆ setToRotation()

AECECS& AECECS::setToRotation ( double  angle,
const OdGeVector3d axis,
const OdGePoint3d center = OdGePoint3d::kOrigin 
)

Sets this matrix to the matrix which rotates by angle about an axis passing through center, and returns a reference to this matrix.

Parameters
angle[in] Rotation angle.
axis[in] Rotation axis.
center[in] Center of rotation.

◆ setToScaling() [1/2]

AECECS& AECECS::setToScaling ( const OdGeScale3d scale,
const OdGePoint3d center = OdGePoint3d::kOrigin 
)

◆ setToScaling() [2/2]

AECECS& AECECS::setToScaling ( double  scale,
const OdGePoint3d center = OdGePoint3d::kOrigin 
)

Sets this matrix to the matrix which scales by scale about center, and returns a reference to this matrix.

Parameters
scale[in] Scale factor.
center[in] Center of scaling.

◆ setToTranslation()

AECECS & AECECS::setToTranslation ( const OdGeVector3d vect)
inline

Sets this matrix to the matrix which translates by vect, and returns a reference to this matrix.

Parameters
vect[in] Translation vector.

Definition at line 655 of file AECECS.h.

◆ setToWorldToPlane() [1/2]

AECECS& AECECS::setToWorldToPlane ( const OdGePlane plane)

◆ setToWorldToPlane() [2/2]

AECECS & AECECS::setToWorldToPlane ( const OdGeVector3d normal)
inline

Sets this matrix to the matrix which maps the WCS to the plane coordinate system, and returns a reference to this matrix.

Parameters
normal[in] The normal to the plane.
plane[in] The plane.
Remarks
If normal is specified, the origin of the plane is (0,0,0)

Definition at line 666 of file AECECS.h.

◆ setTranslation()

AECECS & AECECS::setTranslation ( const OdGeVector3d vect)
inline

Sets the translation part of the matrix to the specified vector.

Parameters
vect[in] Translation vector.

Definition at line 650 of file AECECS.h.

◆ translation() [1/2]

const OdGeVector3d & AECECS::translation ( ) const
inline

Definition at line 646 of file AECECS.h.

◆ translation() [2/2]

AECECS AECECS::translation ( const OdGeVector3d vect)
inlinestatic

Returns the translation vector of this matrix, or the matrix of the translation by vect.

Parameters
vect[in] Translation vector.

Definition at line 677 of file AECECS.h.

◆ validateZero()

void AECECS::validateZero ( const OdGeTol tol = OdGeContext::gTol)
inline

Sets any values within tol of 0 to 0.

Definition at line 671 of file AECECS.h.

◆ worldToPlane() [1/2]

static AECECS AECECS::worldToPlane ( const OdGePlane plane)
static

◆ worldToPlane() [2/2]

static AECECS AECECS::worldToPlane ( const OdGeVector3d normal)
static

Returns the matrix which maps the WCS to the plane coordinate system.

Parameters
normal[in] The normal to the plane.
plane[in] The plane.
Remarks
If normal is specified, the origin of the plane is (0,0,0)

Member Data Documentation

◆ kIdentity

const AECECS AECECS::kIdentity
static

Definition at line 60 of file AECECS.h.

◆ m_origin

OdGePoint3d AECECS::m_origin

Definition at line 548 of file AECECS.h.

◆ m_xAxis

OdGeVector3d AECECS::m_xAxis

Definition at line 549 of file AECECS.h.

◆ m_yAxis

OdGeVector3d AECECS::m_yAxis

Definition at line 550 of file AECECS.h.

◆ m_zAxis

OdGeVector3d AECECS::m_zAxis

Definition at line 551 of file AECECS.h.


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