CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
GeScale3d.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, 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 Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2022 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
31class OdGeMatrix3d;
32#include "Ge/GeGbl.h"
33
34#include "TD_PackPush.h"
35
47{
48public:
49
57 : sx(1.0), sy(1.0), sz(1.0) {}
58
68 double factor)
69 : sx(factor), sy(factor), sz(factor) {}
70
82 double xFactor,
83 double yFactor, double zFactor)
84 : sx(xFactor), sy(yFactor), sz(zFactor) {}
85
86 GE_STATIC_EXPORT static const OdGeScale3d kIdentity; // Multplicitive identity scale.
87
103 const OdGeScale3d& scaleVec) const;
104
118 double factor) const;
119
121 double factor,
122 const OdGeScale3d& scaleVec);
123
132 OdGeScale3d& operator *=(
133 const OdGeScale3d& scaleVec);
134
147 OdGeScale3d& operator *=(
148 double factor);
149
160 {
161 return operator *=(leftSide);
162 }
163
174 {
175 return operator *=(rightSide);
176 }
177
194 const OdGeScale3d& scaleVec1,
195 const OdGeScale3d& scaleVec2);
196
213 const OdGeScale3d& scaleVec, double factor);
214
219
225
232 const OdGeTol& tol = OdGeContext::gTol) const;
233
240 const OdGeScale3d& scaleVec) const;
241
248 const OdGeScale3d& scaleVec) const;
249
258 const OdGeScale3d& scaleVec,
259 const OdGeTol& tol = OdGeContext::gTol) const;
260
271 double operator [](
272 unsigned int i) const { return * (&sx+i); }
273
283 double& operator [] (
284 unsigned int i) { return * (&sx+i); }
285
295 double xFactor,
296 double yFactor,
297 double zFactor)
298 { sx = xFactor; sy = yFactor; sz = zFactor; return *this; }
299
303 operator OdGeMatrix3d () const;
304
312 OdGeMatrix3d& xfm) const;
313
324 const OdGeMatrix3d& xfm);
325
339 OdGeMatrix3d& xfm,
340 bool negateX = false);
341
345 bool isValid () const { return OdNonZero (sx) && OdNonZero (sy) && OdNonZero (sz); }
346
347 double sx; // X scale *factor*.
348 double sy; // Y scale *factor*.
349 double sz; // Z scale *factor*.
350};
351
352#include "TD_PackPop.h"
353
354#endif // OD_GESCL3D_H
355
AECBASE_API OdGePoint3d operator*(const AECECS &matrix, const OdGePoint3d &point)
tol
Definition: DimVarDefs.h:2287
#define GE_TOOLKIT_EXPORT
Definition: GeExport.h:49
#define GE_STATIC_EXPORT
Definition: GeExport.h:52
bool operator!=(T left, const OdGiVariant::EnumType right)
Definition: GiVariant.h:403
bool operator==(T left, const OdGiVariant::EnumType right)
Definition: GiVariant.h:397
bool OdNonZero(double x, double tol=1.e-10)
Definition: OdaDefs.h:537
OdGeScale3d & preMultBy(const OdGeScale3d &leftSide)
Definition: GeScale3d.h:159
static GE_STATIC_EXPORT const OdGeScale3d kIdentity
Definition: GeScale3d.h:86
OdGeScale3d & set(double xFactor, double yFactor, double zFactor)
Definition: GeScale3d.h:294
bool isProportional(const OdGeTol &tol=OdGeContext::gTol) const
void getMatrix(OdGeMatrix3d &xfm) const
OdGeScale3d & postMultBy(const OdGeScale3d &rightSide)
Definition: GeScale3d.h:173
OdGeScale3d inverse() const
double sx
Definition: GeScale3d.h:347
OdGeScale3d(double xFactor, double yFactor, double zFactor)
Definition: GeScale3d.h:81
double sz
Definition: GeScale3d.h:349
OdGeScale3d & invert()
OdGeScale3d & setToProduct(const OdGeScale3d &scaleVec, double factor)
bool isValid() const
Definition: GeScale3d.h:345
double sy
Definition: GeScale3d.h:348
bool isEqualTo(const OdGeScale3d &scaleVec, const OdGeTol &tol=OdGeContext::gTol) const
OdGeScale3d & removeScale(OdGeMatrix3d &xfm, bool negateX=false)
OdGeScale3d(double factor)
Definition: GeScale3d.h:67
OdGeScale3d & setToProduct(const OdGeScale3d &scaleVec1, const OdGeScale3d &scaleVec2)
OdGeScale3d & extractScale(const OdGeMatrix3d &xfm)
Definition: GeTol.h:49
static GE_STATIC_EXPORT OdGeTol gTol
Definition: GeGbl.h:65