CFx SDK Documentation  2022 SP0
GeScale3d.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, Open Design Alliance (the "Alliance").
3 // All rights reserved.
4 //
5 // This software and its documentation and related materials are owned by
6 // the Alliance. The software may only be incorporated into application
7 // programs owned by members of the Alliance, subject to a signed
8 // Membership Agreement and Supplemental Software License Agreement with the
9 // Alliance. The structure and organization of this software are the valuable
10 // trade secrets of the Alliance and its suppliers. The software is also
11 // protected by copyright law and international treaty provisions. Application
12 // programs incorporating this software must include the following statement
13 // with their copyright notices:
14 //
15 // This application incorporates Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 by Open Design Alliance.
18 // All rights reserved.
19 //
20 // By use of this software, its documentation or related materials, you
21 // acknowledge and accept the above terms.
23 
24 
25 
26 
27 #ifndef OD_GESCL3D_H
28 #define OD_GESCL3D_H
31 class OdGeMatrix3d;
32 #include "Ge/GeGbl.h"
33 
34 #include "TD_PackPush.h"
35 
47 {
48 public:
49 
57  : sx (1.0), sy (1.0), sz (1.0) {}
58 
60  double factor)
61  : sx (factor), sy (factor), sz (factor) {}
62 
64  double xFactor,
65  double yFactor, double zFactor)
66  : sx (xFactor), sy (yFactor), sz (zFactor) {}
67 
68  GE_STATIC_EXPORT static const OdGeScale3d kIdentity; // Multplicitive identity scale.
69 
74  const OdGeScale3d& scaleVec) const;
76  double factor) const;
77 
79  double factor,
80  const OdGeScale3d& scaleVec);
81 
91  OdGeScale3d& operator *= (
92  const OdGeScale3d& scaleVec);
93  OdGeScale3d& operator *= (
94  double factor);
95 
106  const OdGeScale3d& leftSide);
107 
118  const OdGeScale3d& rightSide);
119 
134  const OdGeScale3d& scaleVec1,
135  const OdGeScale3d& scaleVec2);
136 
151  const OdGeScale3d& scaleVec, double factor);
152 
157 
163 
170  const OdGeTol& tol = OdGeContext::gTol) const;
171 
173  const OdGeScale3d& scaleVec) const;
175  const OdGeScale3d& scaleVec) const;
176 
184  bool isEqualTo (
185  const OdGeScale3d& scaleVec,
186  const OdGeTol& tol = OdGeContext::gTol) const;
187 
197  double operator [] (
198  unsigned int i) const { return * (&sx+i); }
199  double& operator [] (
200  unsigned int i) { return * (&sx+i); }
201 
211  double xFactor,
212  double yFactor,
213  double zFactor)
214  { sx = xFactor; sy = yFactor; sz = zFactor; return *this; }
215 
219  operator OdGeMatrix3d () const;
220 
227  void getMatrix (
228  OdGeMatrix3d& xfm) const;
229 
240  const OdGeMatrix3d& xfm);
241 
253  OdGeMatrix3d& xfm);
254 
258  bool isValid () const { return OdNonZero (sx) && OdNonZero (sy) && OdNonZero (sz); }
259 
260  double sx; // X scale *factor*.
261  double sy; // Y scale *factor*.
262  double sz; // Z scale *factor*.
263 };
264 
265 #include "TD_PackPop.h"
266 
267 #endif // OD_GESCL3D_H
268 
tol
Definition: DimVarDefs.h:2287
#define GE_TOOLKIT_EXPORT
Definition: GeExport.h:49
#define GE_STATIC_EXPORT
Definition: GeExport.h:53
GE_TOOLKIT_EXPORT OdGeVector3d operator*(const OdGeMatrix3d &matrix, const OdGeVector3d &vect)
bool OdNonZero(double x, double tol=1.e-10)
Definition: OdaDefs.h:518
static GE_STATIC_EXPORT const OdGeScale3d kIdentity
Definition: GeScale3d.h:68
bool isProportional(const OdGeTol &tol=OdGeContext::gTol) const
void getMatrix(OdGeMatrix3d &xfm) const
OdGeScale3d & invert()
OdGeScale3d & preMultBy(const OdGeScale3d &leftSide)
OdGeScale3d inverse() const
OdGeScale3d & removeScale(OdGeMatrix3d &xfm)
OdGeScale3d & set(double xFactor, double yFactor, double zFactor)
Definition: GeScale3d.h:210
OdGeScale3d & extractScale(const OdGeMatrix3d &xfm)
double sx
Definition: GeScale3d.h:260
OdGeScale3d(double xFactor, double yFactor, double zFactor)
Definition: GeScale3d.h:63
double sz
Definition: GeScale3d.h:262
OdGeScale3d & setToProduct(const OdGeScale3d &scaleVec1, const OdGeScale3d &scaleVec2)
bool isValid() const
Definition: GeScale3d.h:258
double sy
Definition: GeScale3d.h:261
bool isEqualTo(const OdGeScale3d &scaleVec, const OdGeTol &tol=OdGeContext::gTol) const
OdGeScale3d(double factor)
Definition: GeScale3d.h:59
OdGeScale3d & setToProduct(const OdGeScale3d &scaleVec, double factor)
OdGeScale3d & postMultBy(const OdGeScale3d &rightSide)
Definition: GeTol.h:49
bool DAI_EXPORT operator!=(const OdDAI::OdSelect &left, const OdDAI::OdSelect &right)
bool DAI_EXPORT operator==(const OdFileDescriptionAuto &left, const OdFileDescriptionAuto &right)
static GE_STATIC_EXPORT OdGeTol gTol
Definition: GeGbl.h:60