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

#include <GeScale3d.h>

Public Member Functions

 OdGeScale3d ()
 
 OdGeScale3d (double factor)
 
 OdGeScale3d (double xFactor, double yFactor, double zFactor)
 
OdGeScale3d operator* (const OdGeScale3d &scaleVec) const
 
OdGeScale3d operator* (double factor) const
 
OdGeScale3doperator*= (const OdGeScale3d &scaleVec)
 
OdGeScale3doperator*= (double factor)
 
OdGeScale3dpreMultBy (const OdGeScale3d &leftSide)
 
OdGeScale3dpostMultBy (const OdGeScale3d &rightSide)
 
OdGeScale3dsetToProduct (const OdGeScale3d &scaleVec1, const OdGeScale3d &scaleVec2)
 
OdGeScale3dsetToProduct (const OdGeScale3d &scaleVec, double factor)
 
OdGeScale3d inverse () const
 
OdGeScale3dinvert ()
 
bool isProportional (const OdGeTol &tol=OdGeContext::gTol) const
 
bool operator== (const OdGeScale3d &scaleVec) const
 
bool operator!= (const OdGeScale3d &scaleVec) const
 
bool isEqualTo (const OdGeScale3d &scaleVec, const OdGeTol &tol=OdGeContext::gTol) const
 
double operator[] (unsigned int i) const
 
double & operator[] (unsigned int i)
 
OdGeScale3dset (double xFactor, double yFactor, double zFactor)
 
 operator OdGeMatrix3d () const
 
void getMatrix (OdGeMatrix3d &xfm) const
 
OdGeScale3dextractScale (const OdGeMatrix3d &xfm)
 
OdGeScale3dremoveScale (OdGeMatrix3d &xfm)
 
bool isValid () const
 

Public Attributes

double sx
 
double sy
 
double sz
 

Static Public Attributes

static GE_STATIC_EXPORT const OdGeScale3d kIdentity
 

Friends

OdGeScale3d operator* (double factor, const OdGeScale3d &scaleVec)
 

Detailed Description

This class represents scaling transformations (scale vectors) in 3D space.

Remarks
OdGeScale3d may be viewed as an array[3] of doubles.

Corresponding C++ library: TD_Ge

<group OdGe_Classes>

Definition at line 46 of file GeScale3d.h.

Constructor & Destructor Documentation

◆ OdGeScale3d() [1/3]

OdGeScale3d::OdGeScale3d ( )
inline
Parameters
factor[in] Uniform scale factor.
xFactor[in] The X scale factor.
yFactor[in] The Y scale factor.
zFactor[in] The Z scale factor.
source[in] Object to be cloned.

Definition at line 56 of file GeScale3d.h.

◆ OdGeScale3d() [2/3]

OdGeScale3d::OdGeScale3d ( double  factor)
inline

Definition at line 59 of file GeScale3d.h.

◆ OdGeScale3d() [3/3]

OdGeScale3d::OdGeScale3d ( double  xFactor,
double  yFactor,
double  zFactor 
)
inline

Definition at line 63 of file GeScale3d.h.

Member Function Documentation

◆ extractScale()

OdGeScale3d& OdGeScale3d::extractScale ( const OdGeMatrix3d xfm)

Returns the scale vector corresponding to the lengths of the column vectors of the transformation matrix.

Parameters
xfm[out] Receives the 3D transformation matrix.
Remarks
xfm must be scaled ortho; i.e., xfm.isScaledOrtho () == true.

◆ getMatrix()

void OdGeScale3d::getMatrix ( OdGeMatrix3d xfm) const

Returns the transformation matrix equivalent to this scale vector.

Parameters
xfm[out] Receives the 3D transformation matrix.

◆ inverse()

OdGeScale3d OdGeScale3d::inverse ( ) const

Returns the inverse of this scale vector.

◆ invert()

OdGeScale3d& OdGeScale3d::invert ( )

Sets this scale vector to its inverse, and returns a reference to this scale vector.

◆ isEqualTo()

bool OdGeScale3d::isEqualTo ( const OdGeScale3d scaleVec,
const OdGeTol tol = OdGeContext::gTol 
) const

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

Parameters
scaleVec[in] Any 2D scale vector.
tol[in] Geometric tolerance.

◆ isProportional()

bool OdGeScale3d::isProportional ( const OdGeTol tol = OdGeContext::gTol) const

Returns true if and only if the scaling matrix corresponding to this scale vector isUniScaledOrtho ().

Parameters
tol[in] Geometric tolerance.

◆ isValid()

bool OdGeScale3d::isValid ( void  ) const
inline

Returns true if this scale vector has nonzero coordinates or false if at least one coordinate is zero.

Definition at line 258 of file GeScale3d.h.

◆ operator OdGeMatrix3d()

OdGeScale3d::operator OdGeMatrix3d ( ) const

Returns the equivalent 3D tranformation matrix.

◆ operator!=()

bool OdGeScale3d::operator!= ( const OdGeScale3d scaleVec) const

◆ operator*() [1/2]

OdGeScale3d OdGeScale3d::operator* ( const OdGeScale3d scaleVec) const
Parameters
scaleVec[in] Any 3D scale vector.
factor[in] Uniform scale factor.

◆ operator*() [2/2]

OdGeScale3d OdGeScale3d::operator* ( double  factor) const

◆ operator*=() [1/2]

OdGeScale3d& OdGeScale3d::operator*= ( const OdGeScale3d scaleVec)
Parameters
scaleVec[in] Any 3D scale vector.
factor[in] Uniform scale factor.
Remarks
Multiplication of scale vectors is defined as follows:
      scl * [xs ys zs]              = [scl*xs scl*ys scl*zs]
      [xs1 ys1 zs1] * [xs2 ys2 zs2] = [xs1*xs2 ys1*ys2 zs1*zs2]

◆ operator*=() [2/2]

OdGeScale3d& OdGeScale3d::operator*= ( double  factor)

◆ operator==()

bool OdGeScale3d::operator== ( const OdGeScale3d scaleVec) const

◆ operator[]() [1/2]

double& OdGeScale3d::operator[] ( unsigned int  i)
inline

Definition at line 199 of file GeScale3d.h.

◆ operator[]() [2/2]

double OdGeScale3d::operator[] ( unsigned int  i) const
inline
Parameters
i[in] Index of component.

Returns or references the ith component of the scale vector.

0 returns or references the X scale factor. 1 returns or references the Y scale factor. 2 returns or references the Z scale factor.

Definition at line 197 of file GeScale3d.h.

◆ postMultBy()

OdGeScale3d& OdGeScale3d::postMultBy ( const OdGeScale3d rightSide)

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

Parameters
rightSide[in] Any 3D scale vector.
Remarks
Scale muliplications is commutative.

◆ preMultBy()

OdGeScale3d& OdGeScale3d::preMultBy ( const OdGeScale3d leftSide)

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

Parameters
leftSide[in] Any 3D scale vector.
Remarks
Scale muliplications is commutative.

◆ removeScale()

OdGeScale3d& OdGeScale3d::removeScale ( OdGeMatrix3d xfm)

Returns the scale vector corresponding to the lengths of the column vectors of the transformation matrix, and sets the scale factor of the matrix to 1 .

Parameters
xfm[out] Receives the 2D transformation matrix.
Remarks
xfm must be scaled ortho; i.e., xfm.isScaledOrtho () == true.

◆ set()

OdGeScale3d& OdGeScale3d::set ( double  xFactor,
double  yFactor,
double  zFactor 
)
inline

Sets this scale vector to the specified X and Y factors, and returns a reference to this vectors.

Parameters
xFactor[in] The X scale factor.
yFactor[in] The Y scale factor.
zFactor[in] The Z scale factor.

Definition at line 210 of file GeScale3d.h.

◆ setToProduct() [1/2]

OdGeScale3d& OdGeScale3d::setToProduct ( const OdGeScale3d scaleVec,
double  factor 
)

Sets this scale vector to the product factor * scaleVec, and returns a reference to this scale vector.

Parameters
factor[in] Uniform scale factor.
scaleVec[in] Any 2D scale vector.
Remarks
Multiplication of scale vectors is defined as follows:
      scl * [xs ys zs]              = [scl*xs scl*ys scl*zs]
      [xs1 ys1 zs1] * [xs2 ys2 zs2] = [xs1*xs2 ys1*ys2 zs1*zs2]

◆ setToProduct() [2/2]

OdGeScale3d& OdGeScale3d::setToProduct ( const OdGeScale3d scaleVec1,
const OdGeScale3d scaleVec2 
)

Sets this scale vector to the product scaleVec1 * scaleVec2 and returns a reference to this scale vector.

Parameters
scaleVec1[in] Any 2D scale vector.
scaleVec2[in] Any 2D scale vector.
Remarks
Multiplication of scale vectors is defined as follows:
      scl * [xs ys zs]              = [scl*xs scl*ys scl*zs]
      [xs1 ys1 zs1] * [xs2 ys2 zs2] = [xs1*xs2 ys1*ys2 zs1*zs2]

Friends And Related Function Documentation

◆ operator*

OdGeScale3d operator* ( double  factor,
const OdGeScale3d scaleVec 
)
friend

Member Data Documentation

◆ kIdentity

GE_STATIC_EXPORT const OdGeScale3d OdGeScale3d::kIdentity
static

Definition at line 68 of file GeScale3d.h.

◆ sx

double OdGeScale3d::sx

Definition at line 260 of file GeScale3d.h.

◆ sy

double OdGeScale3d::sy

Definition at line 261 of file GeScale3d.h.

◆ sz

double OdGeScale3d::sz

Definition at line 262 of file GeScale3d.h.


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