CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
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 ( )

Default constructor for the OdGeScale2d class.

Remarks
Constructs the uniform unit scale transformation.

◆ OdGeScale2d() [2/3]

OdGeScale2d::OdGeScale2d ( double  factor)

Constructor for the OdGeScale2d class.

Parameters
factor[in] Uniform scale factor.
Remarks
The constructor constructs a unified scale factor with the specified double value.

◆ OdGeScale2d() [3/3]

OdGeScale2d::OdGeScale2d ( double  xFactor,
double  yFactor 
)

Constructor for the OdGeScale2d class.

Parameters
xFactor[in] The X scale factor.
yFactor[in] The Y scale factor.
Remarks
The constructor constructs scale transformation with the specified factors for X and Y axes.

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 to be compared with this 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 transformation matrix.

◆ operator OdGeScale3d()

OdGeScale2d::operator OdGeScale3d ( ) const

Returns the equivalent 3D scale vector [sx sy 1].

◆ operator!=()

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

Inequality operator for the OdGeScale2d object. Returns true if this scale vector is not equal to the input scale vector.

Parameters
scaleVec[in] A scale vector to be compared with this scale vector.

◆ operator*() [1/2]

OdGeScale2d OdGeScale2d::operator* ( const OdGeScale2d scaleVec) const

Multiplication operator for the OdGeScale2d object.

Parameters
scaleVec[in] Any 2D scale vector scale factors of which are multiplied.
Remarks
Multiplies scale factors of the passed object with scale factors of this object and returns the resulting object. Multiplication of scale vectors is defined as follows:
      <pre>
      scl * [xs ys]          = [scl*xs scl*ys]
      [xs1 ys1] * [xs2 ys2]  = [xs1*xs2 ys1*ys2]
      </pre>

◆ operator*() [2/2]

OdGeScale2d OdGeScale2d::operator* ( double  factor) const

Multiplication operator for the OdGeScale2d object. Returns the resulting scale object.

Parameters
factor[in] Uniform scale factor.
Remarks
Multiplication of scale vectors is defined as follows:
      <pre>
      scl * [xs1 ys1]        = [scl*xs1 scl*ys1]
      [xs1 ys1 ] * [xs2 ys2] = [xs1*xs2 ys1*ys2]
      </pre>

◆ operator*=() [1/2]

OdGeScale2d & OdGeScale2d::operator*= ( const OdGeScale2d scaleVec)

Multiplication operator for the OdGeScale2d object.

Parameters
scaleVec[in] Any 2D scale vector scale factors of which are multiplied.
Remarks
Multiplies the passed scale factor with scale factors for X and Y axes of this object.

◆ operator*=() [2/2]

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

Multiplication operator for the OdGeScale2d object. Returns a reference to the resulting scale object.

Parameters
factor[in] Uniform scale factor.
Remarks
Multiplication of scale vectors is defined as follows:
      <pre>
      scl * [xs1 ys1]        = [scl*xs1 scl*ys1]
      [xs1 ys1 ] * [xs2 ys2] = [xs1*xs2 ys1*ys2]
      </pre>

◆ operator==()

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

Equality operator for the OdGeScale2d object. Returns true if this scale vector is equal to the input scale vector.

Parameters
scaleVec[in] A scale vector to be compared with this scale vector.

◆ operator[]() [1/2]

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

References the ith component of the scale vector.

Parameters
i[in] Index of component.
Returns
if the passed index is 0 - references the X scale factor. if the passed index is 1 - references the Y scale factor.

Definition at line 268 of file GeScale2d.h.

◆ operator[]() [2/2]

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

Returns the ith component of the scale vector.

Parameters
i[in] Index of component.
Returns
if the passed index is 0 - returns the X scale factor. if the passed index is 1 - returns the Y scale factor.

Definition at line 283 of file GeScale2d.h.

◆ postMultBy()

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

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 that is multiplied with this scale vector.
Remarks
Scale multiplications are commutative.

Definition at line 139 of file GeScale2d.h.

◆ preMultBy()

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

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 that is multiplied with this scale vector.
Remarks
Scale multiplications are commutative.

Definition at line 125 of file GeScale2d.h.

◆ 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
scaleVec[in] Any 2D scale vector that is multiplied by .
factor[in] Uniform scale factor.
Remarks
Multiplication of scale vectors is defined as follows:
      <pre>
      scl * [xs1 ys1]        = [scl*xs1 scl*ys1]
      [xs1 ys1 ] * [xs2 ys2] = [xs1*xs2 ys1*ys2]
      </pre>

◆ 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:
      <pre>
      scl * [xs1 ys1]        = [scl*xs1 scl*ys1]
      [xs1 ys1 ] * [xs2 ys2] = [xs1*xs2 ys1*ys2]
      </pre>

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 82 of file GeScale2d.h.

◆ sx

double OdGeScale2d::sx

Definition at line 344 of file GeScale2d.h.

◆ sy

double OdGeScale2d::sy

Definition at line 345 of file GeScale2d.h.


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