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

#include <GeScale2d.h>

Public Member Functions

 OdGeScale2d ()
 
 OdGeScale2d (double factor)
 
 OdGeScale2d (double xFactor, double yFactor)
 
OdGeScale2d operator* (const OdGeScale2d &scaleVec) const
 
OdGeScale2doperator*= (const OdGeScale2d &scaleVec)
 
OdGeScale2dpreMultBy (const OdGeScale2d &leftSide)
 
OdGeScale2dpostMultBy (const OdGeScale2d &rightSide)
 
OdGeScale2dsetToProduct (const OdGeScale2d &scaleVec, double factor)
 
OdGeScale2dsetToProduct (const OdGeScale2d &scaleVec1, const OdGeScale2d &scaleVec2)
 
OdGeScale2d operator* (double factor) const
 
OdGeScale2doperator*= (double factor)
 
OdGeScale2d inverse () const
 
OdGeScale2dinvert ()
 
bool isProportional (const OdGeTol &tol=OdGeContext::gTol) const
 
bool operator== (const OdGeScale2d &scaleVec) const
 
bool operator!= (const OdGeScale2d &scaleVec) const
 
bool isEqualTo (const OdGeScale2d &scaleVec, const OdGeTol &tol=OdGeContext::gTol) const
 
double & operator[] (unsigned int i)
 
double operator[] (unsigned int i) const
 
OdGeScale2dset (double xFactor, double yFactor)
 
void getMatrix (OdGeMatrix2d &xfm) const
 
OdGeScale2dextractScale (const OdGeMatrix2d &xfm)
 
OdGeScale2dremoveScale (OdGeMatrix2d &xfm)
 
 operator OdGeMatrix2d () const
 
 operator OdGeScale3d () const
 

Public Attributes

double sx
 
double sy
 

Static Public Attributes

static GE_STATIC_EXPORT const OdGeScale2d kIdentity
 

Friends

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

Detailed Description

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

Remarks
OdGeScale2d may be viewed as an array[2] of doubles.

Corresponding C++ library: TD_Ge

<group OdGe_Classes>

Definition at line 46 of file GeScale2d.h.

Constructor & Destructor Documentation

◆ OdGeScale2d() [1/3]

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

◆ OdGeScale2d() [2/3]

OdGeScale2d::OdGeScale2d ( double  factor)

◆ OdGeScale2d() [3/3]

OdGeScale2d::OdGeScale2d ( double  xFactor,
double  yFactor 
)

Member Function Documentation

◆ extractScale()

OdGeScale2d& OdGeScale2d::extractScale ( const OdGeMatrix2d xfm)

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

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

◆ getMatrix()

void OdGeScale2d::getMatrix ( OdGeMatrix2d xfm) const

Returns the transformation matrix equivalent to this scale vector.

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

◆ inverse()

OdGeScale2d OdGeScale2d::inverse ( ) const

Returns the inverse of this scale vector.

◆ invert()

OdGeScale2d& OdGeScale2d::invert ( )

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

◆ isEqualTo()

bool OdGeScale2d::isEqualTo ( const OdGeScale2d 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 OdGeScale2d::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.

◆ operator OdGeMatrix2d()

OdGeScale2d::operator OdGeMatrix2d ( ) const

Returns the equivalent 2D tranformation matrix. or a 3D scale vector [sx sy 1].

◆ operator OdGeScale3d()

OdGeScale2d::operator OdGeScale3d ( ) const

◆ operator!=()

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

◆ operator*() [1/2]

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

◆ operator*() [2/2]

OdGeScale2d OdGeScale2d::operator* ( double  factor) const
Parameters
factor[in] Uniform scale factor.
Remarks
Multiplication of scale vectors is defined as follows:
      scl * [xs1 ys1]        = [scl*xs1 scl*ys1]
      [xs1 ys1 ] * [xs2 ys2] = [xs1*xs2 ys1*ys2]

◆ operator*=() [1/2]

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

◆ operator*=() [2/2]

OdGeScale2d& OdGeScale2d::operator*= ( double  factor)
Parameters
factor[in] Uniform scale factor.

◆ operator==()

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

◆ operator[]() [1/2]

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

Returns or references the ith component of the scale vector.

Parameters
i[in] Index of component.
Remarks
0 returns or references the X scale factor. 1 returns or references the Y scale factor.

Definition at line 205 of file GeScale2d.h.

◆ operator[]() [2/2]

double OdGeScale2d::operator[] ( unsigned int  i) const
inline

Definition at line 210 of file GeScale2d.h.

◆ postMultBy()

OdGeScale2d& OdGeScale2d::postMultBy ( const OdGeScale2d rightSide)

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

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

◆ preMultBy()

OdGeScale2d& OdGeScale2d::preMultBy ( const OdGeScale2d leftSide)

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

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

◆ removeScale()

OdGeScale2d& OdGeScale2d::removeScale ( OdGeMatrix2d 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()

OdGeScale2d& OdGeScale2d::set ( double  xFactor,
double  yFactor 
)

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

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

◆ setToProduct() [1/2]

OdGeScale2d& OdGeScale2d::setToProduct ( const OdGeScale2d 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 * [xs1 ys1]        = [scl*xs1 scl*ys1]
      [xs1 ys1 ] * [xs2 ys2] = [xs1*xs2 ys1*ys2]

◆ setToProduct() [2/2]

OdGeScale2d& OdGeScale2d::setToProduct ( const OdGeScale2d scaleVec1,
const OdGeScale2d 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 * [xs1 ys1]        = [scl*xs1 scl*ys1]
      [xs1 ys1 ] * [xs2 ys2] = [xs1*xs2 ys1*ys2]

Friends And Related Function Documentation

◆ operator*

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

Member Data Documentation

◆ kIdentity

GE_STATIC_EXPORT const OdGeScale2d OdGeScale2d::kIdentity
static

Definition at line 61 of file GeScale2d.h.

◆ sx

double OdGeScale2d::sx

Definition at line 269 of file GeScale2d.h.

◆ sy

double OdGeScale2d::sy

Definition at line 270 of file GeScale2d.h.


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