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

Default constructor for the OdGeScale3d class.

Remarks
Constructs the scale object with 1.0 for scale factor for each axis.

Definition at line 56 of file GeScale3d.h.

◆ OdGeScale3d() [2/3]

OdGeScale3d::OdGeScale3d ( double  factor)
inline

Constructor for the OdGeScale3d class.

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

Definition at line 67 of file GeScale3d.h.

◆ OdGeScale3d() [3/3]

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

Constructor for the OdGeScale3d class.

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

Definition at line 81 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 3D scale vector to be compared with this 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 ( ) const
inline

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

Definition at line 345 of file GeScale3d.h.

◆ operator OdGeMatrix3d()

OdGeScale3d::operator OdGeMatrix3d ( ) const

Returns the equivalent 3D tranformation matrix.

◆ operator!=()

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

Inequality operator for the OdGeScale3d 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]

OdGeScale3d OdGeScale3d::operator* ( const OdGeScale3d scaleVec) const

Multiplication operator for the OdGeScale3d object.

Parameters
scaleVec[in] Any 3D 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]

OdGeScale3d OdGeScale3d::operator* ( double  factor) const

Multiplication operator for the OdGeScale3d 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]

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

Multiplication operator for the OdGeScale3d object.

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

◆ operator*=() [2/2]

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

Multiplication operator for the OdGeScale3d 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 OdGeScale3d::operator== ( const OdGeScale3d scaleVec) const

Equality operator for the OdGeScale3d 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 & OdGeScale3d::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. if the passed index is 2 - references the Z scale factor.

Definition at line 283 of file GeScale3d.h.

◆ operator[]() [2/2]

double OdGeScale3d::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. if the passed index is 2 - returns the Z scale factor.

Definition at line 271 of file GeScale3d.h.

◆ postMultBy()

OdGeScale3d & OdGeScale3d::postMultBy ( const OdGeScale3d 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 3D scale vector that is multiplied with this scale vector.
Remarks
Scale multiplications are commutative.

Definition at line 173 of file GeScale3d.h.

◆ preMultBy()

OdGeScale3d & OdGeScale3d::preMultBy ( const OdGeScale3d 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 3D scale vector that is multiplied with this scale vector.
Remarks
Scale multiplications are commutative.

Definition at line 159 of file GeScale3d.h.

◆ removeScale()

OdGeScale3d & OdGeScale3d::removeScale ( OdGeMatrix3d xfm,
bool  negateX = false 
)

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 3D transformation matrix.
negateX[in] Specifies which implementation is used.
Remarks
xfm must be scaled ortho; i.e., xfm.isScaledOrtho () == true. If negateX is true, the old ODA Platform implementation is used. Otherwise ACAD implementation is used.

◆ 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 294 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 3D scale vector that is multiplied with the provided scale uniform scale factor.
Remarks
Multiplication of scale vectors is defined as follows:
      <pre>
      scl * [xs ys zs]              = [scl*xs scl*ys scl*zs]
      [xs1 ys1 zs1] * [xs2 ys2 zs2] = [xs1*xs2 ys1*ys2 zs1*zs2]
      </pre>

◆ 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 3D scale vector that is multiplied with the second scale vector.
scaleVec2[in] Any 3D scale vector that is multiplied with the first scale vector.
Remarks
Multiplication of scale vectors is defined as follows:
      <pre>
      scl * [xs ys zs]              = [scl*xs scl*ys scl*zs]
      [xs1 ys1 zs1] * [xs2 ys2 zs2] = [xs1*xs2 ys1*ys2 zs1*zs2]
      </pre>

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 86 of file GeScale3d.h.

◆ sx

double OdGeScale3d::sx

Definition at line 347 of file GeScale3d.h.

◆ sy

double OdGeScale3d::sy

Definition at line 348 of file GeScale3d.h.

◆ sz

double OdGeScale3d::sz

Definition at line 349 of file GeScale3d.h.


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