CFx SDK Documentation
2020SP3
SDK
CFx
dd_inc
Ge
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
46
class
GE_TOOLKIT_EXPORT
OdGeScale3d
47
{
48
public
:
49
56
OdGeScale3d
()
57
: sx (1.0), sy (1.0), sz (1.0) {}
58
59
OdGeScale3d
(
60
double
factor)
61
: sx (factor), sy (factor), sz (factor) {}
62
63
OdGeScale3d
(
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
73
OdGeScale3d
operator *
(
74
const
OdGeScale3d
& scaleVec)
const
;
75
OdGeScale3d
operator *
(
76
double
factor)
const
;
77
78
friend
OdGeScale3d
operator *
(
79
double
factor,
80
const
OdGeScale3d
& scaleVec);
81
91
OdGeScale3d
& operator *= (
92
const
OdGeScale3d
& scaleVec);
93
OdGeScale3d
& operator *= (
94
double
factor);
95
105
OdGeScale3d
&
preMultBy
(
106
const
OdGeScale3d
& leftSide);
107
117
OdGeScale3d
&
postMultBy
(
118
const
OdGeScale3d
& rightSide);
119
133
OdGeScale3d
&
setToProduct
(
134
const
OdGeScale3d
& scaleVec1,
135
const
OdGeScale3d
& scaleVec2);
136
150
OdGeScale3d
&
setToProduct
(
151
const
OdGeScale3d
& scaleVec,
double
factor);
152
156
OdGeScale3d
inverse
()
const
;
157
162
OdGeScale3d
&
invert
();
163
169
bool
isProportional
(
170
const
OdGeTol
&
tol
=
OdGeContext::gTol
)
const
;
171
172
bool
operator ==
(
173
const
OdGeScale3d
& scaleVec)
const
;
174
bool
operator !=
(
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
210
OdGeScale3d
&
set
(
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
239
OdGeScale3d
&
extractScale
(
240
const
OdGeMatrix3d
& xfm);
241
252
OdGeScale3d
&
removeScale
(
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
OdGeScale3d::getMatrix
void getMatrix(OdGeMatrix3d &xfm) const
OdGeScale3d::set
OdGeScale3d & set(double xFactor, double yFactor, double zFactor)
Definition:
GeScale3d.h:210
OdGeScale3d::preMultBy
OdGeScale3d & preMultBy(const OdGeScale3d &leftSide)
OdGeScale3d::isEqualTo
bool isEqualTo(const OdGeScale3d &scaleVec, const OdGeTol &tol=OdGeContext::gTol) const
tol
tol
Definition:
DimVarDefs.h:2287
OdGeScale3d
Definition:
GeScale3d.h:47
TD_PackPop.h
GeGbl.h
OdGeScale3d::OdGeScale3d
OdGeScale3d(double xFactor, double yFactor, double zFactor)
Definition:
GeScale3d.h:63
OdGeMatrix3d
Definition:
GeMatrix3d.h:73
OdGeScale3d::inverse
OdGeScale3d inverse() const
operator*
GE_TOOLKIT_EXPORT OdGeVector3d operator*(const OdGeMatrix3d &matrix, const OdGeVector3d &vect)
OdGeScale3d::extractScale
OdGeScale3d & extractScale(const OdGeMatrix3d &xfm)
OdGeScale3d::sz
double sz
Definition:
GeScale3d.h:262
OdDAI::operator!=
bool DAI_EXPORT operator!=(const OdDAI::OdSelect &left, const OdDAI::OdSelect &right)
OdGeScale3d::setToProduct
OdGeScale3d & setToProduct(const OdGeScale3d &scaleVec, double factor)
OdGeScale3d::postMultBy
OdGeScale3d & postMultBy(const OdGeScale3d &rightSide)
OdGeScale3d::invert
OdGeScale3d & invert()
TD_PackPush.h
OdGeScale3d::sx
double sx
Definition:
GeScale3d.h:260
OdGeScale3d::OdGeScale3d
OdGeScale3d()
Definition:
GeScale3d.h:56
OdGeContext::gTol
static GE_STATIC_EXPORT OdGeTol gTol
Definition:
GeGbl.h:60
GE_TOOLKIT_EXPORT
#define GE_TOOLKIT_EXPORT
Definition:
GeExport.h:49
OdGeScale3d::OdGeScale3d
OdGeScale3d(double factor)
Definition:
GeScale3d.h:59
OdDAI::operator==
bool DAI_EXPORT operator==(const OdFileDescriptionAuto &left, const OdFileDescriptionAuto &right)
OdGeScale3d::isValid
bool isValid() const
Definition:
GeScale3d.h:258
OdGeScale3d::isProportional
bool isProportional(const OdGeTol &tol=OdGeContext::gTol) const
OdGeScale3d::setToProduct
OdGeScale3d & setToProduct(const OdGeScale3d &scaleVec1, const OdGeScale3d &scaleVec2)
GE_STATIC_EXPORT
#define GE_STATIC_EXPORT
Definition:
GeExport.h:53
OdGeTol
Definition:
GeTol.h:49
OdGeScale3d::removeScale
OdGeScale3d & removeScale(OdGeMatrix3d &xfm)
OdGeScale3d::kIdentity
static GE_STATIC_EXPORT const OdGeScale3d kIdentity
Definition:
GeScale3d.h:68
OdNonZero
bool OdNonZero(double x, double tol=1.e-10)
Definition:
OdaDefs.h:518
OdGeScale3d::sy
double sy
Definition:
GeScale3d.h:261
Generated on Mon Oct 12 2020 11:49:33