CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
TrVisBasis.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// Orthogonal basis definition
24
25#ifndef ODTRVISBASIS
26#define ODTRVISBASIS
27
28#include "TD_PackPush.h"
29
30#include "TrVisDefs.h"
31
37{
38 protected:
40 public:
41 enum Axis
42 { kX = 0, kY = 1, kZ = 2 };
43 protected:
44 template <typename MtxType>
45 static OD_CONSTEXPR bool is4x4Matrix(const MtxType &xMat) { return sizeof(MtxType) > sizeof(OD_TYPENAME MtxType::EntryType) * 9; }
46 static void axisNormalize(OdGeVector3d &axis, const OdGeVector3d &defAxis)
48 axis.normalize(OdGeTol(1.e-300), error);
49 if (error != OdGe::kOk)
50 axis = defAxis;
51 }
52 public:
54
55 // Setup default WCS basis
57 {
61 return *this;
62 }
63 // Setup from input vectors
64 template <typename VecType>
65 OdTrVisOrthoBasis &set(const VecType &xAxis, const VecType &yAxis, const VecType &zAxis)
66 {
67 m_axis[kX].set(xAxis[0], xAxis[1], xAxis[2]);
68 m_axis[kY].set(yAxis[0], yAxis[1], yAxis[2]);
69 m_axis[kZ].set(zAxis[0], zAxis[1], zAxis[2]);
70 return *this;
71 }
72 // Setup from Ge matrix
74 {
75 m_axis[kX] = xMat.getCsXAxis();
76 m_axis[kY] = xMat.getCsYAxis();
77 m_axis[kZ] = xMat.getCsZAxis();
78 return *this;
79 }
80 // Setup from any type of OdTr matrix
81 template <typename MtxType>
82 OdTrVisOrthoBasis &set(const MtxType &xMat)
83 {
84 m_axis[kX].set(xMat.entry[0][0], xMat.entry[1][0], xMat.entry[2][0]);
85 m_axis[kY].set(xMat.entry[0][1], xMat.entry[1][1], xMat.entry[2][1]);
86 m_axis[kZ].set(xMat.entry[0][2], xMat.entry[1][2], xMat.entry[2][2]);
87 return *this;
88 }
89
90 // Local setters
91 OdTrVisOrthoBasis &setXAxis(const OdGeVector3d &axis) { m_axis[kX] = axis; return *this; }
92 OdTrVisOrthoBasis &setYAxis(const OdGeVector3d &axis) { m_axis[kY] = axis; return *this; }
93 OdTrVisOrthoBasis &setZAxis(const OdGeVector3d &axis) { m_axis[kZ] = axis; return *this; }
94
95 OdTrVisOrthoBasis &setAxis(Axis nAxis, const OdGeVector3d &axis) { m_axis[nAxis] = axis; return *this; }
96
97 // Getters
98 const OdGeVector3d &xAxis() const { return m_axis[kX]; }
99 const OdGeVector3d &yAxis() const { return m_axis[kY]; }
100 const OdGeVector3d &zAxis() const { return m_axis[kZ]; }
101
102 const OdGeVector3d &getAxis(Axis axis) { return m_axis[axis]; }
103
104 // Get as Ge matrix
106 {
107 xMat.setCoordSystem(csOrigin, m_axis[kX], m_axis[kY], m_axis[kZ]);
108 return xMat;
109 }
110 // Get as any OdTr matrix
111 template <typename MtxType>
112 MtxType &get(MtxType &xMat) const
113 {
114 xMat.entry[0][0] = (OD_TYPENAME MtxType::EntryType)m_axis[kX].x;
115 xMat.entry[1][0] = (OD_TYPENAME MtxType::EntryType)m_axis[kX].y;
116 xMat.entry[2][0] = (OD_TYPENAME MtxType::EntryType)m_axis[kX].z;
117 xMat.entry[0][1] = (OD_TYPENAME MtxType::EntryType)m_axis[kY].x;
118 xMat.entry[1][1] = (OD_TYPENAME MtxType::EntryType)m_axis[kY].y;
119 xMat.entry[2][1] = (OD_TYPENAME MtxType::EntryType)m_axis[kY].z;
120 xMat.entry[0][2] = (OD_TYPENAME MtxType::EntryType)m_axis[kZ].x;
121 xMat.entry[1][2] = (OD_TYPENAME MtxType::EntryType)m_axis[kZ].y;
122 xMat.entry[2][2] = (OD_TYPENAME MtxType::EntryType)m_axis[kZ].z;
123 if (is4x4Matrix(xMat))
124 *(xMat.entry[0] + 3) = *(xMat.entry[1] + 3) = *(xMat.entry[2] + 3) =
125 *(xMat.entry[2] + 4) = *(xMat.entry[2] + 5) = *(xMat.entry[2] + 6) = 0.0f, *(xMat.entry[2] + 7) = 1.0f;
126 return xMat;
127 }
128
129 // Comparision
130 bool operator ==(const OdTrVisOrthoBasis &basis) const
131 {
132 return m_axis[kX].isCodirectionalTo(basis.m_axis[kX]) &&
135 }
136 bool operator !=(const OdTrVisOrthoBasis &basis) const
137 {
138 return !m_axis[kX].isCodirectionalTo(basis.m_axis[kX]) ||
139 !m_axis[kY].isCodirectionalTo(basis.m_axis[kY]) ||
141 }
142
143 // Transformation (Ge specificaiton)
145 {
146 return OdTrVisOrthoBasis().set(OdGeVector3d(basis.xAxis()).transformBy(xMat),
147 OdGeVector3d(basis.yAxis()).transformBy(xMat),
148 OdGeVector3d(basis.zAxis()).transformBy(xMat));
149 }
151 {
152 return OdTrVisOrthoBasis().set(OdGeVector3d(basis.xAxis()).transformBy(xMat),
153 OdGeVector3d(basis.yAxis()).transformBy(xMat),
154 OdGeVector3d(basis.zAxis()).transformBy(xMat));
155 }
157 {
158 m_axis[kX].transformBy(xMat);
159 m_axis[kY].transformBy(xMat);
160 m_axis[kZ].transformBy(xMat);
161 return *this;
162 }
164 {
165 if (GETBIT(nElem, 1)) m_axis[kX].transformBy(xMat);
166 if (GETBIT(nElem, 2)) m_axis[kY].transformBy(xMat);
167 if (GETBIT(nElem, 4)) m_axis[kZ].transformBy(xMat);
168 return *this;
169 }
170
171 // Transformation (OdTr specification)
172 template <typename MtxType>
173 friend OdTrVisOrthoBasis operator *(const OdTrVisOrthoBasis &basis, const MtxType &xMat)
174 {
175 return OdTrVisOrthoBasis().set(xMat.transformClone(basis.xAxis(), 0.0f),
176 xMat.transformClone(basis.yAxis(), 0.0f),
177 xMat.transformClone(basis.zAxis(), 0.0f));
178 }
179 template <typename MtxType>
180 friend OdTrVisOrthoBasis operator *(const MtxType &xMat, const OdTrVisOrthoBasis &basis)
181 {
182 return OdTrVisOrthoBasis().set(xMat.transformClone(basis.xAxis(), 0.0f),
183 xMat.transformClone(basis.yAxis(), 0.0f),
184 xMat.transformClone(basis.zAxis(), 0.0f));
185 }
186 template <typename MtxType>
187 OdTrVisOrthoBasis &operator *=(const MtxType &xMat)
188 {
189 xMat.transform(m_axis[kX], 0.0f);
190 xMat.transform(m_axis[kY], 0.0f);
191 xMat.transform(m_axis[kZ], 0.0f);
192 return *this;
193 }
194 template <typename MtxType>
195 OdTrVisOrthoBasis &transform(const MtxType &xMat, OdUInt32 nElem)
196 {
197 if (GETBIT(nElem, 1)) xMat.transform(m_axis[kX], 0.0f);
198 if (GETBIT(nElem, 2)) xMat.transform(m_axis[kY], 0.0f);
199 if (GETBIT(nElem, 4)) xMat.transform(m_axis[kZ], 0.0f);
200 return *this;
201 }
202
203 // Normalize basis
205 {
209 return *this;
210 }
211
212 // Transform to local coordinates system
213 template <typename VecType>
214 OdGePoint2d &toLocal2d(OdGePoint2d &point, const VecType &pt) const
215 { const OdGeVector3d projPt(pt[0], pt[1], pt[2]);
216 return point.set(m_axis[kX].dotProduct(projPt), m_axis[kY].dotProduct(projPt)); }
217 template <typename VecType>
218 OdGePoint2d toLocal2d(const VecType &pt) const
219 { const OdGeVector3d projPt(pt[0], pt[1], pt[2]);
220 return OdGePoint2d(m_axis[kX].dotProduct(projPt), m_axis[kY].dotProduct(projPt)); }
221 template <typename VecType>
222 OdGePoint3d &toLocal(OdGePoint3d &point, const VecType &pt) const
223 { const OdGeVector3d projPt(pt[0], pt[1], pt[2]);
224 return point.set(m_axis[kX].dotProduct(projPt), m_axis[kY].dotProduct(projPt), m_axis[kZ].dotProduct(projPt)); }
225 template <typename VecType>
226 OdGePoint3d toLocal(const VecType &pt) const
227 { const OdGeVector3d projPt(pt[0], pt[1], pt[2]);
228 return OdGePoint3d(m_axis[kX].dotProduct(projPt), m_axis[kY].dotProduct(projPt), m_axis[kZ].dotProduct(projPt)); }
229
230 // Transform to global coordinates system
231 OdGePoint3d &toGlobal(OdGePoint3d &point, double fX, double fY) const
232 { return point = (m_axis[kX] * fX + m_axis[kY] * fY).asPoint(); }
233 OdGePoint3d toGlobal(double fX, double fY) const
234 { return (m_axis[kX] * fX + m_axis[kY] * fY).asPoint(); }
235 template <typename VecType>
236 OdGePoint3d &toGlobal(OdGePoint3d &point, const VecType &pt) const
237 { return point = (m_axis[kX] * pt[0] + m_axis[kY] * pt[1] + m_axis[kZ] * pt[2]).asPoint(); }
238 template <typename VecType>
239 OdGePoint3d toGlobal(const VecType &pt) const
240 { return (m_axis[kX] * pt[0] + m_axis[kY] * pt[1] + m_axis[kZ] * pt[2]).asPoint(); }
241
242 // Calibrate basis
244 {
250 return *this;
251 }
252
253 // Setup basis from direction only
255 {
260 return *this;
261 }
262 // Setup basis from direction and up vector
264 {
269 return *this;
270 }
271};
272
278{
279 protected:
281 public:
283
284 // Setup default WCS basis
286 {
289 return *this;
290 }
291 // Setup from input vectors
292 template <typename VecType, typename VecType2>
293 OdTrVisViewBasis &set(const VecType &origin, const VecType2 &xAxis, const VecType2 &yAxis, const VecType2 &zAxis)
294 {
296 m_origin.set(origin[0], origin[1], origin[2]);
297 return *this;
298 }
299 // Setup from Ge matrix
301 {
303 m_origin = xMat.getCsOrigin();
304 return *this;
305 }
306 // Setup from any type of OdTr matrix
307 template <typename MtxType>
308 OdTrVisViewBasis &set(const MtxType &xMat)
309 {
311 if (is4x4Matrix(xMat))
312 m_origin.set(*(xMat.entry[2] + 4), *(xMat.entry[2] + 5), *(xMat.entry[2] + 6));
313 else
315 return *this;
316 }
317
318 // Local setter
320
321 // Getter
322 const OdGePoint3d &origin() const { return m_origin; }
323
324 // Get as Ge matrix
326 {
327 return OdTrVisOrthoBasis::get(xMat, m_origin);
328 }
329 // Get as any OdTr matrix
330 template <typename MtxType>
331 MtxType &get(MtxType &xMat) const
332 {
334 if (is4x4Matrix(xMat))
335 *(xMat.entry[2] + 4) = (OD_TYPENAME MtxType::EntryType)m_origin.x,
336 *(xMat.entry[2] + 5) = (OD_TYPENAME MtxType::EntryType)m_origin.y,
337 *(xMat.entry[2] + 6) = (OD_TYPENAME MtxType::EntryType)m_origin.z;
338 return xMat;
339 }
340
341 // Comparision
342 bool operator ==(const OdTrVisViewBasis &basis) const
343 {
345 }
346 bool operator !=(const OdTrVisViewBasis &basis) const
347 {
348 return OdTrVisOrthoBasis::operator !=(basis) || !m_origin.isEqualTo(basis.origin());
349 }
350
351 // Transformation (Ge specificaiton)
353 {
354 return OdTrVisViewBasis().set(OdGePoint3d(basis.origin()).transformBy(xMat),
355 OdGeVector3d(basis.xAxis()).transformBy(xMat),
356 OdGeVector3d(basis.yAxis()).transformBy(xMat),
357 OdGeVector3d(basis.zAxis()).transformBy(xMat));
358 }
360 {
361 return OdTrVisViewBasis().set(OdGePoint3d(basis.origin()).transformBy(xMat),
362 OdGeVector3d(basis.xAxis()).transformBy(xMat),
363 OdGeVector3d(basis.yAxis()).transformBy(xMat),
364 OdGeVector3d(basis.zAxis()).transformBy(xMat));
365 }
367 {
368 m_axis[kX].transformBy(xMat);
369 m_axis[kY].transformBy(xMat);
370 m_axis[kZ].transformBy(xMat);
371 m_origin.transformBy(xMat);
372 return *this;
373 }
375 {
376 OdTrVisOrthoBasis::transform(xMat, nElem);
377 if (GETBIT(nElem, 8)) m_origin.transformBy(xMat);
378 return *this;
379 }
380
381 // Transformation (OdTr specification)
382 template <typename MtxType>
383 friend OdTrVisViewBasis operator *(const OdTrVisViewBasis &basis, const MtxType &xMat)
384 {
385 return OdTrVisViewBasis().set(xMat.transformClone(basis.origin()),
386 xMat.transformClone(basis.xAxis(), 0.0f),
387 xMat.transformClone(basis.yAxis(), 0.0f),
388 xMat.transformClone(basis.zAxis(), 0.0f));
389 }
390 template <typename MtxType>
391 friend OdTrVisViewBasis operator *(const MtxType &xMat, const OdTrVisViewBasis &basis)
392 {
393 return OdTrVisViewBasis().set(xMat.transformClone(basis.origin()),
394 xMat.transformClone(basis.xAxis(), 0.0f),
395 xMat.transformClone(basis.yAxis(), 0.0f),
396 xMat.transformClone(basis.zAxis(), 0.0f));
397 }
398 template <typename MtxType>
399 OdTrVisViewBasis &operator *=(const MtxType &xMat)
400 {
401 xMat.transform(m_axis[kX], 0.0f);
402 xMat.transform(m_axis[kY], 0.0f);
403 xMat.transform(m_axis[kZ], 0.0f);
404 xMat.transform(m_origin);
405 return *this;
406 }
407 template <typename MtxType>
408 OdTrVisViewBasis &transform(const MtxType &xMat, OdUInt32 nElem)
409 {
410 OdTrVisOrthoBasis::transform(xMat, nElem);
411 if (GETBIT(nElem, 8)) xMat.transform(m_origin);
412 return *this;
413 }
414
415 // Translation
416 template <typename VecType>
417 friend OdTrVisViewBasis operator +(const OdTrVisViewBasis &basis, const VecType &translationVec)
418 {
419 return OdTrVisViewBasis().set(basis.origin() + translationVec, basis.xAxis(), basis.yAxis(), basis.zAxis());
420 }
421 template <typename VecType>
422 friend OdTrVisViewBasis operator -(const OdTrVisViewBasis &basis, const VecType &translationVec)
423 {
424 return OdTrVisViewBasis().set(basis.origin() - translationVec, basis.xAxis(), basis.yAxis(), basis.zAxis());
425 }
426 template <typename VecType>
427 OdTrVisViewBasis &operator +=(const VecType &translationVec)
428 { m_origin += translationVec;
429 return *this;
430 }
431 template <typename VecType>
432 OdTrVisViewBasis &operator -=(const VecType &translationVec)
433 { m_origin -= translationVec;
434 return *this;
435 }
436
437 // Transform to local coordinates system
438 template <typename VecType>
439 OdGePoint2d &toLocal2d(OdGePoint2d &point, const VecType &pt) const
440 { const OdGeVector3d projPt(pt[0] - m_origin.x, pt[1] - m_origin.y, pt[2] - m_origin.z);
441 return point.set(m_axis[kX].dotProduct(projPt), m_axis[kY].dotProduct(projPt)); }
442 template <typename VecType>
443 OdGePoint2d toLocal2d(const VecType &pt) const
444 { const OdGeVector3d projPt(pt[0] - m_origin.x, pt[1] - m_origin.y, pt[2] - m_origin.z);
445 return OdGePoint2d(m_axis[kX].dotProduct(projPt), m_axis[kY].dotProduct(projPt)); }
446 template <typename VecType>
447 OdGePoint3d &toLocal(OdGePoint3d &point, const VecType &pt) const
448 { const OdGeVector3d projPt(pt[0] - m_origin.x, pt[1] - m_origin.y, pt[2] - m_origin.z);
449 return point.set(m_axis[kX].dotProduct(projPt), m_axis[kY].dotProduct(projPt), m_axis[kZ].dotProduct(projPt)); }
450 template <typename VecType>
451 OdGePoint3d toLocal(const VecType &pt) const
452 { const OdGeVector3d projPt(pt[0] - m_origin.x, pt[1] - m_origin.y, pt[2] - m_origin.z);
453 return OdGePoint3d(m_axis[kX].dotProduct(projPt), m_axis[kY].dotProduct(projPt), m_axis[kZ].dotProduct(projPt)); }
454
455 // Transform to global coordinates system
456 OdGePoint3d &toGlobal(OdGePoint3d &point, double fX, double fY) const
457 { return point = (m_axis[kX] * fX + m_axis[kY] * fY + m_origin.asVector()).asPoint(); }
458 OdGePoint3d toGlobal(double fX, double fY) const
459 { return (m_axis[kX] * fX + m_axis[kY] * fY + m_origin.asVector()).asPoint(); }
460 template <typename VecType>
461 OdGePoint3d &toGlobal(OdGePoint3d &point, const VecType &pt) const
462 { return point = (m_axis[kX] * pt[0] + m_axis[kY] * pt[1] + m_axis[kZ] * pt[2] + m_origin.asVector()).asPoint(); }
463 template <typename VecType>
464 OdGePoint3d toGlobal(const VecType &pt) const
465 { return (m_axis[kX] * pt[0] + m_axis[kY] * pt[1] + m_axis[kZ] * pt[2] + m_origin.asVector()).asPoint(); }
466
467 // Setup basis from direction only
470 {
471 OdTrVisOrthoBasis::makeBasis0(target - pos);
472 m_origin = pos;
473 return *this;
474 }
475 // Setup basis from direction and up vector
478 {
479 OdTrVisOrthoBasis::makeBasis(target - pos, upVector);
480 m_origin = pos;
481 return *this;
482 }
483};
484
485#include "TD_PackPop.h"
486
487#endif // ODTRVISBASIS
#define OD_TYPENAME
Definition: OdPlatform.h:631
unsigned int OdUInt32
#define GETBIT(flags, bit)
Definition: OdaDefs.h:517
#define OD_CONSTEXPR
Definition: TrVisDefs.h:58
OdGePoint3d getCsOrigin() const
OdGeMatrix3d & setCoordSystem(const OdGePoint3d &origin, const OdGeVector3d &xAxis, const OdGeVector3d &yAxis, const OdGeVector3d &zAxis)
OdGeVector3d getCsYAxis() const
OdGeVector3d getCsZAxis() const
OdGeVector3d getCsXAxis() const
OdGePoint2d & set(double xx, double yy)
Definition: GePoint2d.h:400
bool isEqualTo(const OdGePoint3d &point, const OdGeTol &tol=OdGeContext::gTol) const
double z
Definition: GePoint3d.h:497
OdGePoint3d & transformBy(const OdGeMatrix3d &xfm)
double y
Definition: GePoint3d.h:496
double x
Definition: GePoint3d.h:495
const OdGeVector3d & asVector() const
Definition: GePoint3d.h:549
static GE_STATIC_EXPORT const OdGePoint3d kOrigin
Definition: GePoint3d.h:106
OdGePoint3d & set(double xx, double yy, double zz)
Definition: GePoint3d.h:455
Definition: GeTol.h:49
static GE_STATIC_EXPORT const OdGeVector3d kZAxis
Definition: GeVector3d.h:103
bool isCodirectionalTo(const OdGeVector3d &vect, const OdGeTol &tol=OdGeContext::gTol) const
OdGeVector3d perpVector() const
OdGeVector3d crossProduct(const OdGeVector3d &vect) const
Definition: GeVector3d.h:595
static GE_STATIC_EXPORT const OdGeVector3d kYAxis
Definition: GeVector3d.h:102
OdGeVector3d & normalize(const OdGeTol &tol=OdGeContext::gTol)
OdGeVector3d & set(double xx, double yy, double zz)
Definition: GeVector3d.h:725
OdGeVector3d & transformBy(const OdGeMatrix3d &xfm)
static GE_STATIC_EXPORT const OdGeVector3d kXAxis
Definition: GeVector3d.h:101
const OdGeVector3d & yAxis() const
Definition: TrVisBasis.h:99
OdGeMatrix3d & get(OdGeMatrix3d &xMat, const OdGePoint3d &csOrigin=OdGePoint3d::kOrigin) const
Definition: TrVisBasis.h:105
OdTrVisOrthoBasis & makeBasis0(const OdGeVector3d &direction)
Definition: TrVisBasis.h:254
MtxType & get(MtxType &xMat) const
Definition: TrVisBasis.h:112
friend OdTrVisOrthoBasis operator*(const OdTrVisOrthoBasis &basis, const OdGeMatrix3d &xMat)
Definition: TrVisBasis.h:144
OdTrVisOrthoBasis & transform(const MtxType &xMat, OdUInt32 nElem)
Definition: TrVisBasis.h:195
const OdGeVector3d & getAxis(Axis axis)
Definition: TrVisBasis.h:102
bool operator!=(const OdTrVisOrthoBasis &basis) const
Definition: TrVisBasis.h:136
const OdGeVector3d & xAxis() const
Definition: TrVisBasis.h:98
OdGePoint3d & toLocal(OdGePoint3d &point, const VecType &pt) const
Definition: TrVisBasis.h:222
OdTrVisOrthoBasis & transform(const OdGeMatrix3d &xMat, OdUInt32 nElem)
Definition: TrVisBasis.h:163
OdTrVisOrthoBasis & makeBasis(const OdGeVector3d &direction, const OdGeVector3d &upVector=OdGeVector3d::kYAxis)
Definition: TrVisBasis.h:263
OdTrVisOrthoBasis & set(const MtxType &xMat)
Definition: TrVisBasis.h:82
OdTrVisOrthoBasis & set(const VecType &xAxis, const VecType &yAxis, const VecType &zAxis)
Definition: TrVisBasis.h:65
const OdGeVector3d & zAxis() const
Definition: TrVisBasis.h:100
bool operator==(const OdTrVisOrthoBasis &basis) const
Definition: TrVisBasis.h:130
OdTrVisOrthoBasis & setYAxis(const OdGeVector3d &axis)
Definition: TrVisBasis.h:92
OdTrVisOrthoBasis & setAxis(Axis nAxis, const OdGeVector3d &axis)
Definition: TrVisBasis.h:95
OdTrVisOrthoBasis & setZAxis(const OdGeVector3d &axis)
Definition: TrVisBasis.h:93
OdTrVisOrthoBasis & operator*=(const OdGeMatrix3d &xMat)
Definition: TrVisBasis.h:156
static OD_CONSTEXPR bool is4x4Matrix(const MtxType &xMat)
Definition: TrVisBasis.h:45
OdTrVisOrthoBasis & setXAxis(const OdGeVector3d &axis)
Definition: TrVisBasis.h:91
OdGeVector3d m_axis[3]
Definition: TrVisBasis.h:39
OdTrVisOrthoBasis & calibrate()
Definition: TrVisBasis.h:243
OdGePoint3d & toGlobal(OdGePoint3d &point, const VecType &pt) const
Definition: TrVisBasis.h:236
OdTrVisOrthoBasis & set(const OdGeMatrix3d &xMat)
Definition: TrVisBasis.h:73
OdGePoint3d toLocal(const VecType &pt) const
Definition: TrVisBasis.h:226
OdTrVisOrthoBasis & setDefault()
Definition: TrVisBasis.h:56
OdGePoint3d toGlobal(double fX, double fY) const
Definition: TrVisBasis.h:233
OdGePoint3d & toGlobal(OdGePoint3d &point, double fX, double fY) const
Definition: TrVisBasis.h:231
OdGePoint3d toGlobal(const VecType &pt) const
Definition: TrVisBasis.h:239
OdTrVisOrthoBasis & normalize()
Definition: TrVisBasis.h:204
OdGePoint2d toLocal2d(const VecType &pt) const
Definition: TrVisBasis.h:218
OdGePoint2d & toLocal2d(OdGePoint2d &point, const VecType &pt) const
Definition: TrVisBasis.h:214
static void axisNormalize(OdGeVector3d &axis, const OdGeVector3d &defAxis)
Definition: TrVisBasis.h:46
bool operator!=(const OdTrVisViewBasis &basis) const
Definition: TrVisBasis.h:346
OdTrVisViewBasis & operator*=(const OdGeMatrix3d &xMat)
Definition: TrVisBasis.h:366
OdGePoint3d & toGlobal(OdGePoint3d &point, const VecType &pt) const
Definition: TrVisBasis.h:461
const OdGePoint3d & origin() const
Definition: TrVisBasis.h:322
friend OdTrVisViewBasis operator+(const OdTrVisViewBasis &basis, const VecType &translationVec)
Definition: TrVisBasis.h:417
OdTrVisViewBasis & transform(const MtxType &xMat, OdUInt32 nElem)
Definition: TrVisBasis.h:408
bool operator==(const OdTrVisViewBasis &basis) const
Definition: TrVisBasis.h:342
OdTrVisViewBasis & set(const MtxType &xMat)
Definition: TrVisBasis.h:308
OdGePoint2d toLocal2d(const VecType &pt) const
Definition: TrVisBasis.h:443
OdTrVisViewBasis & makeBasis(const OdGePoint3d &pos, const OdGePoint3d &target, const OdGeVector3d &upVector=OdGeVector3d::kYAxis)
Definition: TrVisBasis.h:477
OdTrVisViewBasis & setDefault()
Definition: TrVisBasis.h:285
OdTrVisViewBasis & operator-=(const VecType &translationVec)
Definition: TrVisBasis.h:432
MtxType & get(MtxType &xMat) const
Definition: TrVisBasis.h:331
friend OdTrVisViewBasis operator*(const OdTrVisViewBasis &basis, const OdGeMatrix3d &xMat)
Definition: TrVisBasis.h:352
OdGePoint3d toGlobal(double fX, double fY) const
Definition: TrVisBasis.h:458
TD_USING(OdTrVisOrthoBasis::makeBasis0)
OdTrVisViewBasis & setOrigin(const OdGePoint3d &origin)
Definition: TrVisBasis.h:319
OdGePoint3d toLocal(const VecType &pt) const
Definition: TrVisBasis.h:451
OdTrVisViewBasis & set(const VecType &origin, const VecType2 &xAxis, const VecType2 &yAxis, const VecType2 &zAxis)
Definition: TrVisBasis.h:293
OdTrVisViewBasis & operator+=(const VecType &translationVec)
Definition: TrVisBasis.h:427
OdTrVisViewBasis & transform(const OdGeMatrix3d &xMat, OdUInt32 nElem)
Definition: TrVisBasis.h:374
OdGePoint3d & toGlobal(OdGePoint3d &point, double fX, double fY) const
Definition: TrVisBasis.h:456
OdGeMatrix3d & get(OdGeMatrix3d &xMat, const OdGePoint3d &csOrigin=OdGePoint3d::kOrigin) const
Definition: TrVisBasis.h:325
OdGePoint3d & toLocal(OdGePoint3d &point, const VecType &pt) const
Definition: TrVisBasis.h:447
friend OdTrVisViewBasis operator-(const OdTrVisViewBasis &basis, const VecType &translationVec)
Definition: TrVisBasis.h:422
OdTrVisViewBasis & set(const OdGeMatrix3d &xMat)
Definition: TrVisBasis.h:300
TD_USING(OdTrVisOrthoBasis::makeBasis)
OdGePoint3d m_origin
Definition: TrVisBasis.h:280
OdGePoint2d & toLocal2d(OdGePoint2d &point, const VecType &pt) const
Definition: TrVisBasis.h:439
OdGePoint3d toGlobal(const VecType &pt) const
Definition: TrVisBasis.h:464
OdTrVisOrthoBasis & makeBasis0(const OdGePoint3d &pos, const OdGePoint3d &target)
Definition: TrVisBasis.h:469
GLfloat GLfloat GLfloat z
Definition: gles2_ext.h:318
GLfloat x
Definition: gles2_ext.h:314
GLfloat GLfloat y
Definition: gles2_ext.h:316
ErrorCondition
Definition: Ge.h:413
@ kOk
Definition: Ge.h:415