dmap4d.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------------------+
2 |
3 | Supplied under applicable software license agreement.
4 |
5 | Copyright (c) 2018 Bentley Systems, Incorporated. All rights reserved.
6 |
7 +---------------------------------------------------------------------------------------*/
8 #pragma once
9 
11 
18 struct GEOMDLLIMPEXP DMap4d
19 {
20 
26 int mask;
27 
28 #ifdef __cplusplus
29 
30 
31 
32 //BEGIN_FROM_METHODS
33 
39 static DMap4d FromIdentity ();
40 
45 static DMap4d From (DMatrix4dCR forwardMatrix, DMatrix4dCR inverseMatrix);
46 
57 static DMap4d FromRotation
58 (
59 double c,
60 double s,
61 double vx,
62 double vy,
63 double vz
64 );
65 
76 static DMap4d FromQuadrantRotation
77 (
78 int multiple,
79 double vx,
80 double vy,
81 double vz
82 );
83 
92 static DMap4d FromRotation
93 (
94 double radians,
95 double vx,
96 double vy,
97 double vz
98 );
99 
109 static DMap4d FromScale
110 (
111 double ax,
112 double ay,
113 double az
114 );
115 
123 static DMap4d FromPrincipleProjection
124 (
125 double height,
126 int axis
127 );
128 
129 
130 
136 static DMap4d FromScale (double a);
137 
145 static DMap4d FromTranslation
146 (
147 double tx,
148 double ty,
149 double tz
150 );
151 
152 //END_FROM_METHODS
153 
155 void InitIdentity ();
156 
161 void InitFrom (DMatrix4dCR forwardMatrix, DMatrix4dCR inverseMatrix);
162 
172 bool InitFromRanges
173 (
174 DPoint3dCR loAP,
175 DPoint3dCR hiAP,
176 DPoint3dCR loBP,
177 DPoint3dCR hiBP
178 );
179 
190 void InitFromRotation
191 (
192 double c,
193 double s,
194 double vx,
195 double vy,
196 double vz
197 );
198 
209 void InitFromQuadrantRotation
210 (
211 int multiple,
212 double vx,
213 double vy,
214 double vz
215 );
216 
225 void InitFromRotation
226 (
227 double radians,
228 double vx,
229 double vy,
230 double vz
231 );
232 
242 void InitFromScale
243 (
244 double ax,
245 double ay,
246 double az
247 );
248 
256 void InitFromPrincipleProjection
257 (
258 double height,
259 int axis
260 );
261 
262 
263 
269 void InitFromScale (double a);
270 
280 void InitFromTranslation
281 (
282 double tx,
283 double ty,
284 double tz
285 );
286 
294 bool InitFromTaper (double taper);
295 
296 
297 
304 bool InitFromTransform
305 (
306 TransformCR transform,
307 bool invert
308 );
309 
310 
311 
336 bool InitFromSkewBox
337 (
338 DPoint4dCR point0001,
339 DPoint4dCR point1001,
340 DPoint4dCR point0101,
341 DPoint4dCR point0010
342 );
343 
353 void ZFrustum
354 (
355 double z0,
356 double zetaHalf
357 );
358 
364 void InverseOf (DMap4dCR B);
365 
374 void SandwichOf
375 (
376 DMap4dCR A,
377 DMap4dCR B,
378 DMap4dCR C
379 );
380 
389 void SandwichOfBABinverse (DMap4dCR A, DMap4dCR B);
397 void SandwichOfBinverseAB (DMap4dCR A, DMap4dCR B);
398 
405 void InitProduct
406 (
407 DMap4dCR A,
408 DMap4dCR B
409 );
410 
419 void InitProduct
420 (
421 DMap4dCR A,
422 bool invertA,
423 DMap4dCR B,
424 bool invertB
425 );
426 
436 bool IsIndependent
437 (
438 int xChange,
439 int yChange,
440 int zChange
441 );
442 
448 bool IsSingular () const;
449 
455 bool IsAffine () const;
456 
462 bool IsPerspective () const;
463 
471 void Explode
472 (
473 RotMatrixR matrix,
474 DPoint3dR translation,
475 DPoint4dR perspective,
476 bool inverse
477 ) const;
478 
479 
484 bool IsIdentity () const;
485 
486 
487 
488 #endif
489 };
struct RotMatrix & RotMatrixR
Definition: msgeomstructs_typedefs.h:135
struct DPoint4d & DPoint4dR
Definition: msgeomstructs_typedefs.h:96
struct DMatrix4d const & DMatrix4dCR
Definition: msgeomstructs_typedefs.h:97
#define END_BENTLEY_GEOMETRY_NAMESPACE
Definition: Bentley.r.h:30
DMatrix4d M0
Forward transformation.
Definition: dmap4d.h:22
DMatrix4d M1
Inverse transformation.
Definition: dmap4d.h:24
struct DMap4d const & DMap4dCR
Definition: msgeomstructs_typedefs.h:98
struct DPoint3d & DPoint3dR
Definition: msgeomstructs_typedefs.h:79
struct Transform const & TransformCR
Definition: msgeomstructs_typedefs.h:134
int mask
Internal state data.
Definition: dmap4d.h:26
#define BEGIN_BENTLEY_GEOMETRY_NAMESPACE
Definition: Bentley.r.h:29
struct DPoint3d const & DPoint3dCR
Definition: msgeomstructs_typedefs.h:79
struct DPoint4d const & DPoint4dCR
Definition: msgeomstructs_typedefs.h:96
Forward and inverse 4x4 matrices of an invertible perspective transformation.
Definition: dmap4d.h:18
4x4 matrix used for perspective (homogeneous coordinate) calculations.
Definition: dmatrix4d.h:18

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.