Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
cRectT.h
Go to the documentation of this file.
1 //
5 //
6 
7 #ifndef _INC_cRectT_H
8 #define _INC_cRectT_H
9 #ifndef NO_PRAGMA_ONCE
10 #pragma once
11 #endif
12 
13 #include "cDirectionDef.h"
14 #include "../Math/cVecT.h"
15 #include "GrayCore/include/cValT.h"
16 
17 namespace GrayLib
18 {
19  class cVariant;
20 
21  template< typename TYPE = double >
23  {
28 
29  typedef cRectT<TYPE> THIS_t;
30  typedef cVecT2<TYPE> POINT_t;
31  public:
32  typedef TYPE DVALUE_t;
33 
34  public:
35  TYPE left, top, right, bottom; // same order as _WIN32 RECT if <int>.
36 
37  public:
38  cRectT() noexcept
39  : left(0)
40  , top(0)
41  , right(0)
42  , bottom(0)
43  {
44  }
45  cRectT(TYPE x1, TYPE y1, TYPE x2, TYPE y2) noexcept
46  : left(x1)
47  , top(y1)
48  , right(x2)
49  , bottom(y2)
50  {
51  }
52  cRectT(const THIS_t& rect) noexcept
53  : left(rect.left)
54  , top(rect.top)
55  , right(rect.right)
56  , bottom(rect.bottom)
57  {
58  }
59 
60  TYPE get_DiffX() const noexcept
61  {
62  // Get Size X. Width maybe.
63  // Not assumed normalized.
64  return this->right - this->left;
65  }
66  TYPE get_DiffY() const noexcept
67  {
68  // Get Size Y. Height maybe.
69  // Not assumed normalized.
70  return this->bottom - this->top;
71  }
72 
73  cVecT2<TYPE> get_Center() const noexcept
74  {
75  return cVecT2<TYPE>((this->left + this->right) / 2, (this->top + this->bottom) / 2);
76  }
77  float get_AspectRatio() const noexcept
78  {
79  TYPE h = get_DiffY();
80  if (h == 0)
81  return 0.0f;
82  TYPE w = get_DiffX();
83  return(((float)w) / ((float)h));
84  }
85  bool IsEqual(const THIS_t& rect) const noexcept
86  {
87  // exactly equal.
88  return !::memcmp(this, &rect, sizeof(THIS_t));
89  }
90  bool operator == (const THIS_t& rect) const noexcept
91  {
92  return IsEqual(rect);
93  }
94  bool operator != (const THIS_t& rect) const noexcept
95  {
96  return !IsEqual(rect);
97  }
98  bool isRectNull() const noexcept
99  {
101  return this->left == 0 && this->right == 0 && this->top == 0 && this->bottom == 0;
102  }
103  bool isRectNormal() const noexcept
104  {
106  return (this->right > this->left) && (this->bottom > this->top);
107  }
108  bool isRectNormalE() const noexcept
109  {
111  return (this->right >= this->left) && (this->bottom >= this->top);
112  }
113  bool IsInRangeX(TYPE value) const noexcept
114  {
116  return Calc::IsInBetween(value, this->left, this->right);
117  }
118  bool IsInRangeY(TYPE value) const noexcept
119  {
121  return Calc::IsInBetween(value, this->top, this->bottom);
122  }
123 
124  // Full Set operators.
125  void SetRectNull() noexcept
126  {
128  this->left = 0;
129  this->top = 0;
130  this->right = 0;
131  this->bottom = 0;
132  }
133  void SetRectWH(TYPE nLeft, TYPE nTop, TYPE nWidth, TYPE nHeight) noexcept
134  {
135  this->left = nLeft;
136  this->top = nTop;
137  this->right = nLeft + nWidth;
138  this->bottom = nTop + nHeight;
139  }
140  void SetRectEmptyX() noexcept
141  {
143  this->left = this->top = (TYPE)INT_MAX;
144  this->right = this->bottom = (TYPE)-INT_MAX;
145  }
146  void SetRect4(TYPE nLeft, TYPE nTop, TYPE nRight, TYPE nBottom) noexcept
147  {
148  this->left = nLeft;
149  this->top = nTop;
150  this->right = nRight;
151  this->bottom = nBottom;
152  }
153  void SetRectAsPt(TYPE x, TYPE y) noexcept
154  {
155  // Set empty rectangle at a point.
156  this->left = x;
157  this->right = x;
158  this->top = y;
159  this->bottom = y;
160  }
161  void SetRectAsPt(const POINT_t& pt) noexcept
162  {
163  SetRectAsPt(pt.x, pt.y);
164  }
165  void SetRectFromSphere(TYPE x, TYPE y, TYPE nRadius) noexcept
166  {
167  // set rectangle to contain a sphere.
168  this->left = x - nRadius;
169  this->top = y - nRadius;
170  this->right = x + nRadius;
171  this->bottom = y + nRadius;
172  }
173 
174  HRESULT SetRectAsStr(const char* pszStr)
175  {
176  TYPE adVals[4];
177  size_t iQty = StrNum::ToValArray(adVals, _countof(adVals), pszStr);
178  if (iQty == 2)
179  {
180  SetRectAsPt(adVals[0], adVals[1]);
181  }
182  else if (iQty == 4)
183  {
184  SetRect4(adVals[0], adVals[1], adVals[2], adVals[3]);
185  }
186  else
187  return E_FAIL;
188  return (HRESULT)iQty;
189  }
190 
191  // Change operators.
192  void OffsetRectX(TYPE dx) noexcept
193  {
194  this->left += dx;
195  this->right += dx;
196  }
197  void OffsetRectY(TYPE dy) noexcept
198  {
199  this->top += dy;
200  this->bottom += dy;
201  }
202  void OffsetRect(TYPE dx, TYPE dy) noexcept
203  {
205  OffsetRectX(dx);
206  OffsetRectY(dy);
207  }
208 
209  void UnionX(TYPE x) noexcept
210  {
213  if (IsInRangeX(x))
214  return;
215  if (this->left <= this->right)
216  {
217  // Normal Rect
218  if (x < this->left)
219  this->left = x;
220  else
221  this->right = x;
222  }
223  else
224  {
225  if (x < this->right)
226  this->right = x;
227  else
228  this->left = x;
229  }
230  }
231  void UnionY(TYPE y) noexcept
232  {
235  if (IsInRangeY(y))
236  return;
237  if (this->top <= this->bottom)
238  {
239  // Normal Rect
240  if (y < this->top)
241  this->top = y;
242  else
243  this->bottom = y;
244  }
245  else
246  {
247  if (y < this->bottom)
248  this->bottom = y;
249  else
250  this->top = y;
251  }
252  }
253  void Union2(TYPE x, TYPE y) noexcept
254  {
256  UnionX(x);
257  UnionY(y);
258  }
259  void Union4(const THIS_t& rect) noexcept
260  {
262  Union2(rect.left, rect.top);
263  Union2(rect.right, rect.bottom);
264  }
265 
266  void ScrollInRangeX(TYPE value) noexcept
267  {
268  if (IsInRangeX(value))
269  return;
270 
271  TYPE d1 = value - this->left;
272  TYPE d2 = value - this->right;
273 
274  if (Calc::Abs(d1) < Calc::Abs(d2))
275  {
276  OffsetRectX(d1);
277  }
278  else
279  {
280  OffsetRectX(d2);
281  }
282  }
283  void ScrollInRangeY(TYPE value)
284  {
285  if (IsInRangeY(value))
286  return;
287 
288  TYPE d1 = value - this->top;
289  TYPE d2 = value - this->bottom;
290 
291  if (Calc::Abs(d1) < Calc::Abs(d2))
292  {
293  OffsetRectY(d1);
294  }
295  else
296  {
297  OffsetRectY(d2);
298  }
299  }
300 
301  void SetRectNotEmpty(TYPE iMin = 10) noexcept
302  {
304  if (this->left == this->right)
305  {
306  this->left -= iMin;
307  this->right += iMin;
308  }
309  if (this->top == this->bottom)
310  {
311  this->top -= iMin;
312  this->bottom += iMin;
313  }
314  }
315 
316  void ScaleX(float mx) noexcept
317  {
318  this->left = (TYPE)(this->left * mx);
319  this->right = (TYPE)(this->right * mx);
320  }
321  void ScaleY(float my) noexcept
322  {
323  this->top = (TYPE)(this->top * my);
324  this->bottom = (TYPE)(this->bottom * my);
325  }
326  void Scale(float mx, float my) noexcept
327  {
328  ScaleX(mx);
329  ScaleY(my);
330  }
331  void AddScaleY() noexcept
332  {
334  if (this->top != this->bottom)
335  {
336  TYPE diff = get_DiffY() / 10;
337  this->top -= diff;
338  this->bottom += diff;
339  }
340  SetRectNotEmpty();
341  }
342 
343  void NormalizeRect() noexcept
344  {
346  if (this->bottom < this->top)
347  {
348  cMemT::Swap(this->bottom, this->top);
349  }
350  if (this->right < this->left)
351  {
352  cMemT::Swap(this->right, this->left);
353  }
354  }
355  };
356 
357  template< typename TYPE >
358  class GRAYLIB_LINK cRectNT : public cRectT<TYPE>
359  {
364 
365  typedef cRectT<TYPE> SUPER_t;
366  typedef cRectNT<TYPE> THIS_t;
367 
368  public:
369  cRectNT() noexcept
370  {
371  }
372  cRectNT(TYPE x1, TYPE y1, TYPE x2, TYPE y2) noexcept
373  : cRectT<TYPE>(x1, y1, x2, y2)
374  {
375  }
376  cRectNT(const SUPER_t& rect) noexcept
377  : cRectT<TYPE>(rect)
378  {
379  }
380 
381  // const operations
382  TYPE get_X() const noexcept
383  {
384  return this->left;
385  }
386  TYPE X() const noexcept
387  {
388  return this->left;
389  }
390  TYPE get_Y() const noexcept
391  {
392  return this->top;
393  }
394  TYPE Y() const noexcept
395  {
396  return this->top;
397  }
398 
399  TYPE get_Width() const noexcept
400  {
401  // get_DiffX assumed normalized.
402  return this->right - this->left;
403  }
404  TYPE Width() const noexcept // MFC compatible
405  {
406  // get_DiffX assumed normalized.
407  return this->right - this->left;
408  }
409 
410  TYPE get_Height() const noexcept
411  {
412  // get_DiffY assumed normalized.
413  return this->bottom - this->top;
414  }
415  TYPE Height() const noexcept // MFC compatible
416  {
417  // get_DiffY assumed normalized.
418  return this->bottom - this->top;
419  }
420 
421  TYPE get_Radius() const noexcept
422  {
423  TYPE nDistX = get_Width();
424  TYPE nDistY = get_Height();
425  return Calc::Max(nDistX, nDistY) / 2;
426  }
427 
428  bool IsRectEmpty() const noexcept
429  {
431  return !this->isRectNormal();
432  }
433 
434  // Change operators.
435 
436  void SetLT(TYPE nLeft2, TYPE nTop2) noexcept
437  {
439  this->OffsetRect(nLeft2 - this->left, nTop2 - this->top);
440  }
441  void SetWidth(TYPE cx) noexcept
442  {
443  this->right = this->left + cx;
444  }
445  void SetHeight(TYPE cy) noexcept
446  {
447  this->bottom = this->top + cy;
448  }
449  void SetWH(TYPE nWidth = 0, TYPE nHeight = 0) noexcept
450  {
453  SetWidth(nWidth);
454  SetHeight(nHeight);
455  }
456 
457  void InflateRectX(TYPE dx) noexcept
458  {
459  this->left -= dx;
460  this->right += dx;
461  }
462  void InflateRectY(TYPE dy) noexcept
463  {
464  this->top -= dy;
465  this->bottom += dy;
466  }
467  void InflateRectBoth(TYPE dx, TYPE dy) noexcept
468  {
471  InflateRectX(dx);
472  InflateRectY(dy);
473  }
474 
475  void UnionRect(const THIS_t& rect) noexcept
476  {
479  if (rect.left < this->left)
480  this->left = rect.left;
481  if (rect.top < this->top)
482  this->top = rect.top;
483  if (rect.right > this->right)
484  this->right = rect.right;
485  if (rect.bottom > this->bottom)
486  this->bottom = rect.bottom;
487  }
488  void UnionRectE(const THIS_t& rect) noexcept
489  {
492  if (rect.IsRectEmpty())
493  return;
494  if (IsRectEmpty())
495  {
496  *this = rect;
497  return;
498  }
499  UnionRect(rect);
500  }
501 
502  bool IntersectRect(const THIS_t& rect) noexcept
503  {
508  if (IsRectEmpty())
509  return false;
510  if (rect.IsRectEmpty())
511  {
512  this->SetRectEmptyX();
513  return false;
514  }
515  if (rect.left > this->left)
516  this->left = rect.left;
517  if (rect.top > this->top)
518  this->top = rect.top;
519  if (rect.right < this->right)
520  this->right = rect.right;
521  if (rect.bottom < this->bottom)
522  this->bottom = rect.bottom;
523  return !IsRectEmpty();
524  }
525 
526  void RectClamp(TYPE cx = (TYPE)INT_MAX, TYPE cy = (TYPE)INT_MAX) noexcept
527  {
529  if (this->left < 0)
530  this->left = 0;
531  if (this->top < 0)
532  this->top = 0;
533  if (this->right < 0)
534  this->right = 0;
535  if (this->bottom < 0)
536  this->bottom = 0;
537 
538  if (this->right > cx)
539  this->right = cx;// left> right??
540  if (this->bottom > cy)
541  this->bottom = cy;
542  }
543  void NormalizeRectClamp(TYPE cx = (TYPE)INT_MAX, TYPE cy = (TYPE)INT_MAX) noexcept
544  {
545  this->NormalizeRect();
546  RectClamp(cx, cy);
547  }
548  };
549 
550  template < typename TYPE = float >
551  class GRAYLIB_LINK cRectFT : public cRectNT<TYPE>
552  {
557 
558  typedef cRectNT<TYPE> SUPER_t;
559  typedef cVecT2<TYPE> POINT_t;
560  typedef cRectNT<TYPE> RECT_t;
561 
562  public:
563  cRectFT(TYPE nleft = 0, TYPE ntop = 0, TYPE nright = 0, TYPE nbottom = 0) noexcept
564  : cRectNT<TYPE>(nleft, ntop, nright, nbottom)
565  {
566  this->NormalizeRect();
567  }
568  cRectFT(const POINT_t& ptCenter, TYPE nSizeX = 0, TYPE nSizeY = 0) noexcept
569  : cRectNT<TYPE>(ptCenter.x - nSizeX, ptCenter.y - nSizeY, ptCenter.x + nSizeX, ptCenter.y + nSizeY)
570  {
571  this->NormalizeRect();
572  }
573  cRectFT(const SUPER_t& rect) noexcept
575  {
576  this->NormalizeRect();
577  }
578 
579  bool IsInsideX(TYPE x) const noexcept
580  {
582  return x >= this->left && x <= this->right;
583  }
584  bool IsInsideY(TYPE y) const noexcept
585  {
587  return(y >= this->top && y <= this->bottom);
588  }
589  bool PtInRect(TYPE x, TYPE y) const noexcept
590  {
592  return IsInsideX(x) && IsInsideY(y);
593  }
594  bool PtInRect(const POINT_t& pt) const noexcept
595  {
600  return PtInRect(pt.x, pt.y);
601  }
602 
603  bool IsInsideMe(const RECT_t& rect) const
604  {
608  if (rect.left < this->left)
609  return false;
610  if (rect.top < this->top)
611  return false;
612  if (rect.right > this->right)
613  return false;
614  if (rect.bottom > this->bottom)
615  return false;
616  return true; // inside or equal.
617  }
618  bool IsOverlapped(const RECT_t& rect) const
619  {
623  if (rect.left > this->right)
624  return false;
625  if (rect.top > this->bottom)
626  return false;
627  if (rect.right < this->left)
628  return false;
629  if (rect.bottom < this->top)
630  return false;
631  return true;
632  }
633 
634  bool ClampPtInRect(OUT POINT_t& pt) const
635  {
638 
639  bool bChange = false;
640  // x
641  if (pt.x < this->left)
642  {
643  pt.x = this->left;
644  bChange = true;
645  }
646  if (pt.x > this->right)
647  {
648  pt.x = this->right;
649  bChange = true;
650  }
651  // y
652  if (pt.y < this->top)
653  {
654  pt.y = this->top;
655  bChange = true;
656  }
657  if (pt.y > this->bottom)
658  {
659  pt.y = this->bottom;
660  bChange = true;
661  }
662  return bChange;
663  }
664 
665 #if 0
666  void SnapToGrid(TYPE fSizeXY)
667  {
669  fSizeXY--;
670  this->left &= ~iSizeXY;
671  this->right = (right | iSizeXY) + 1;
672  this->top &= ~iSizeXY;
673  this->bottom = (bottom | iSizeXY) + 1;
674  }
675 #endif
676 
677  void UnionPoint(TYPE x, TYPE y)
678  {
682  if (x < this->left)
683  this->left = x;
684  if (y < this->top)
685  this->top = y;
686  if (x > this->right)
687  this->right = x;
688  if (y > this->bottom)
689  this->bottom = y;
690  }
691 
692  // POINT_t GetRectCorner( DIR_TYPE eDir ) const;
693  // float SetRectStr( const GChar_t* pVal );
694 
695  cString get_RectStr(void) const
696  {
697  return cString::GetFormatf(_GT("%f,%f,%f,%f"), // TODO USE StrArg
698  (float)this->left,
699  (float)this->top,
700  (float)this->right,
701  (float)this->bottom);
702  }
703 
704  ITERATE_t v_SetRect(const cVariant& vVal);
705  void v_GetRect(cVariant& vVal) const;
706  };
707 
710 
711 #ifdef GRAY_DLL // force implementation/instantiate for DLL/SO.
712  template class GRAYLIB_LINK cRectT<double>;
713  template class GRAYLIB_LINK cRectT<float>;
714  template class GRAYLIB_LINK cRectT<int>;
715  template class GRAYLIB_LINK cRectNT<double>;
716  template class GRAYLIB_LINK cRectNT<float>;
717  template class GRAYLIB_LINK cRectNT<int>;
718 #endif
719 
720 };
721 
722 #endif // _INC_cRectT_H
#define GRAYLIB_LINK
Definition: GrayLibBase.h:35
#define _GT(x)
like _T(x) macro for static text.
Definition: StrConst.h:27
#define TYPE
Definition: StrT.cpp:38
INT32 HRESULT
_WIN32 style error codes. INT32
Definition: SysTypes.h:465
#define _countof(a)
Definition: cKernel.h:35
Definition: cRectT.h:552
cRectFT(TYPE nleft=0, TYPE ntop=0, TYPE nright=0, TYPE nbottom=0) noexcept
Definition: cRectT.h:563
bool IsInsideMe(const RECT_t &rect) const
Definition: cRectT.h:603
bool IsOverlapped(const RECT_t &rect) const
Definition: cRectT.h:618
cRectFT(const POINT_t &ptCenter, TYPE nSizeX=0, TYPE nSizeY=0) noexcept
Definition: cRectT.h:568
cRectFT(const SUPER_t &rect) noexcept
Definition: cRectT.h:573
bool PtInRect(TYPE x, TYPE y) const noexcept
Definition: cRectT.h:589
cString get_RectStr(void) const
Definition: cRectT.h:695
bool IsInsideX(TYPE x) const noexcept
Definition: cRectT.h:579
bool ClampPtInRect(OUT POINT_t &pt) const
Definition: cRectT.h:634
bool IsInsideY(TYPE y) const noexcept
Definition: cRectT.h:584
void UnionPoint(TYPE x, TYPE y)
Definition: cRectT.h:677
bool PtInRect(const POINT_t &pt) const noexcept
Definition: cRectT.h:594
Definition: cRectT.h:359
void InflateRectBoth(TYPE dx, TYPE dy) noexcept
Definition: cRectT.h:467
void NormalizeRectClamp(TYPE cx=(TYPE) INT_MAX, TYPE cy=(TYPE) INT_MAX) noexcept
Definition: cRectT.h:543
cRectNT(TYPE x1, TYPE y1, TYPE x2, TYPE y2) noexcept
Definition: cRectT.h:372
TYPE get_Radius() const noexcept
Definition: cRectT.h:421
TYPE get_Width() const noexcept
Definition: cRectT.h:399
TYPE Height() const noexcept
Definition: cRectT.h:415
bool IntersectRect(const THIS_t &rect) noexcept
Definition: cRectT.h:502
TYPE get_X() const noexcept
Definition: cRectT.h:382
void UnionRectE(const THIS_t &rect) noexcept
Definition: cRectT.h:488
void SetWidth(TYPE cx) noexcept
Definition: cRectT.h:441
void UnionRect(const THIS_t &rect) noexcept
Definition: cRectT.h:475
void RectClamp(TYPE cx=(TYPE) INT_MAX, TYPE cy=(TYPE) INT_MAX) noexcept
Definition: cRectT.h:526
void SetHeight(TYPE cy) noexcept
Definition: cRectT.h:445
void InflateRectX(TYPE dx) noexcept
Definition: cRectT.h:457
TYPE X() const noexcept
Definition: cRectT.h:386
TYPE Width() const noexcept
Definition: cRectT.h:404
cRectNT(const SUPER_t &rect) noexcept
Definition: cRectT.h:376
TYPE Y() const noexcept
Definition: cRectT.h:394
TYPE get_Height() const noexcept
Definition: cRectT.h:410
bool IsRectEmpty() const noexcept
Definition: cRectT.h:428
void SetWH(TYPE nWidth=0, TYPE nHeight=0) noexcept
Definition: cRectT.h:449
cRectNT() noexcept
Definition: cRectT.h:369
void InflateRectY(TYPE dy) noexcept
Definition: cRectT.h:462
TYPE get_Y() const noexcept
Definition: cRectT.h:390
void SetLT(TYPE nLeft2, TYPE nTop2) noexcept
Definition: cRectT.h:436
Definition: cRectT.h:23
void SetRectNotEmpty(TYPE iMin=10) noexcept
Definition: cRectT.h:301
void Union4(const THIS_t &rect) noexcept
Definition: cRectT.h:259
void SetRectNull() noexcept
Definition: cRectT.h:125
HRESULT SetRectAsStr(const char *pszStr)
Definition: cRectT.h:174
bool IsInRangeY(TYPE value) const noexcept
Definition: cRectT.h:118
void ScaleY(float my) noexcept
Definition: cRectT.h:321
void UnionX(TYPE x) noexcept
Definition: cRectT.h:209
cRectT(TYPE x1, TYPE y1, TYPE x2, TYPE y2) noexcept
Definition: cRectT.h:45
cVecT2< TYPE > get_Center() const noexcept
Definition: cRectT.h:73
bool isRectNull() const noexcept
Definition: cRectT.h:98
TYPE bottom
Definition: cRectT.h:35
void NormalizeRect() noexcept
Definition: cRectT.h:343
void OffsetRectY(TYPE dy) noexcept
Definition: cRectT.h:197
float get_AspectRatio() const noexcept
Definition: cRectT.h:77
TYPE DVALUE_t
Dimension value type.
Definition: cRectT.h:32
bool isRectNormal() const noexcept
Definition: cRectT.h:103
void SetRectAsPt(const POINT_t &pt) noexcept
Definition: cRectT.h:161
cRectT(const THIS_t &rect) noexcept
Definition: cRectT.h:52
void OffsetRect(TYPE dx, TYPE dy) noexcept
Definition: cRectT.h:202
void SetRectAsPt(TYPE x, TYPE y) noexcept
Definition: cRectT.h:153
void ScrollInRangeY(TYPE value)
Definition: cRectT.h:283
bool IsInRangeX(TYPE value) const noexcept
Definition: cRectT.h:113
void Union2(TYPE x, TYPE y) noexcept
Definition: cRectT.h:253
void SetRectEmptyX() noexcept
Definition: cRectT.h:140
void SetRectWH(TYPE nLeft, TYPE nTop, TYPE nWidth, TYPE nHeight) noexcept
Definition: cRectT.h:133
void SetRectFromSphere(TYPE x, TYPE y, TYPE nRadius) noexcept
Definition: cRectT.h:165
void UnionY(TYPE y) noexcept
Definition: cRectT.h:231
void ScaleX(float mx) noexcept
Definition: cRectT.h:316
void SetRect4(TYPE nLeft, TYPE nTop, TYPE nRight, TYPE nBottom) noexcept
Definition: cRectT.h:146
void Scale(float mx, float my) noexcept
Definition: cRectT.h:326
TYPE get_DiffX() const noexcept
Definition: cRectT.h:60
void OffsetRectX(TYPE dx) noexcept
Definition: cRectT.h:192
void ScrollInRangeX(TYPE value) noexcept
Definition: cRectT.h:266
void AddScaleY() noexcept
Definition: cRectT.h:331
bool IsEqual(const THIS_t &rect) const noexcept
Definition: cRectT.h:85
cRectT() noexcept
Definition: cRectT.h:38
bool isRectNormalE() const noexcept
Definition: cRectT.h:108
TYPE get_DiffY() const noexcept
Definition: cRectT.h:66
Definition: cVariant.h:26
Definition: cVecT.h:473
static THIS_t _cdecl GetFormatf(const GChar_t *pszFormat,...)
Definition: cString.cpp:521
Definition: cMesh.h:22
cRectFT< double > cRectd
Definition: cRectT.h:709
cRectFT< float > cRectf
Definition: cRectT.h:708
interface const RECTQ_t & rect
Definition: cQuadtree.h:44
class __DECL_IMPORT cVariant
Definition: cJSONWriter.h:19
int ITERATE_t
like size_t but signed
Definition: Index.h:28
bool operator!=(const cTimeDouble &dt1, const cTimeDouble &dt2)
Definition: cTimeDouble.h:254
bool operator==(const cTimeDouble &dt1, const cTimeDouble &dt2)
Definition: cTimeDouble.h:250
static TYPE Max(TYPE a, TYPE b) noexcept
Definition: Calc.h:98
static bool IsInBetween(TYPE n, TYPE a, TYPE b) noexcept
Definition: Calc.h:83
static TYPE Abs(TYPE a) noexcept
similar to ABS(n) macro. Does nothing for unsigned types.
static size_t __stdcall ToValArray(OUT _TYPE *pOut, size_t iQtyMax, const char *pszInp)
Definition: StrNum.h:135
static void Swap(TYPE &a, TYPE &b) noexcept
Definition: cValT.h:34