44 TRange(T tLBX, T tLBY, T tUBX, T tUBY)
54 tpPoints[0].x = tr.left;
55 tpPoints[0].y = tr.top;
56 tpPoints[1].x = tr.right;
57 tpPoints[1].y = tr.bottom;
62 tpPoints[0].Set(tr.tpPoints[0]);
63 tpPoints[1].Set(tr.tpPoints[1]);
70 tpPoints[0].Set(pTr->tpPoints[0]);
71 tpPoints[1].Set(pTr->tpPoints[1]);
77 tpPoints[0].Set(tr.tpPoints[0]);
78 tpPoints[1].Set(tr.tpPoints[1]);
85 tpPoints[0].Set(pTr->tpPoints[0]);
86 tpPoints[1].Set(pTr->tpPoints[1]);
92 tpPoints[0].Set(tr.tpPoints[0]);
93 tpPoints[1].Set(tr.tpPoints[1]);
100 tpPoints[0].Set(pTr->tpPoints[0]);
101 tpPoints[1].Set(pTr->tpPoints[1]);
107 tpPoints[0].Set(tr.tpPoints[0]);
108 tpPoints[1].Set(tr.tpPoints[1]);
115 tpPoints[0].Set(pTr->tpPoints[0]);
116 tpPoints[1].Set(pTr->tpPoints[1]);
122 tpPoints[0].Set(tr.tpPoints[0]);
123 tpPoints[1].Set(tr.tpPoints[1]);
130 tpPoints[0].Set(pTr->tpPoints[0]);
131 tpPoints[1].Set(pTr->tpPoints[1]);
137 tpPoints[0].Set(tr.tpPoints[0]);
138 tpPoints[1].Set(tr.tpPoints[1]);
145 tpPoints[0].Set(pTr->tpPoints[0]);
146 tpPoints[1].Set(pTr->tpPoints[1]);
152 tpPoints[0].Set(tr.tpPoints[0]);
153 tpPoints[1].Set(tr.tpPoints[1]);
160 tpPoints[0].Set(pTr->tpPoints[0]);
161 tpPoints[1].Set(pTr->tpPoints[1]);
167 tpPoints[0].Set(tr.tpPoints[0]);
168 tpPoints[1].Set(tr.tpPoints[1]);
175 tpPoints[0].Set(pTr->tpPoints[0]);
176 tpPoints[1].Set(pTr->tpPoints[1]);
182 tpPoints[0].Set(tpLB);
183 tpPoints[1].Set(tpUB);
190 tpPoints[0].Set(pTpLB);
191 tpPoints[1].Set(pTpUB);
197 tpPoints[0].Set(tpLB);
198 tpPoints[1].Set(tpUB);
205 tpPoints[0].Set(pTpLB);
206 tpPoints[1].Set(pTpUB);
212 tpPoints[0].Set(tpLB);
213 tpPoints[1].Set(tpUB);
220 tpPoints[0].Set(pTpLB);
221 tpPoints[1].Set(pTpUB);
227 tpPoints[0].Set(tpLB);
228 tpPoints[1].Set(tpUB);
235 tpPoints[0].Set(pTpLB);
236 tpPoints[1].Set(pTpUB);
242 tpPoints[0].Set(tpLB);
243 tpPoints[1].Set(tpUB);
250 tpPoints[0].Set(pTpLB);
251 tpPoints[1].Set(pTpUB);
257 tpPoints[0].Set(tpLB);
258 tpPoints[1].Set(tpUB);
265 tpPoints[0].Set(pTpLB);
266 tpPoints[1].Set(pTpUB);
272 tpPoints[0].Set(tpLB);
273 tpPoints[1].Set(tpUB);
280 tpPoints[0].Set(pTpLB);
281 tpPoints[1].Set(pTpUB);
287 tpPoints[0].Set(tpLB);
288 tpPoints[1].Set(tpUB);
295 tpPoints[0].Set(pTpLB);
296 tpPoints[1].Set(pTpUB);
301 void Set(T tLBX, T tLBY, T tUBX, T tUBY)
303 tpPoints[0].x = tLBX;
304 tpPoints[0].y = tLBY;
305 tpPoints[1].x = tUBX;
306 tpPoints[1].y = tUBY;
311 tpPoints[0].x = tr.left;
312 tpPoints[0].y = tr.top;
313 tpPoints[1].x = tr.right;
314 tpPoints[1].y = tr.bottom;
319 tpPoints[0].Set(tr.tpPoints[0]);
320 tpPoints[1].Set(tr.tpPoints[1]);
327 tpPoints[0].Set(pTr->tpPoints[0]);
328 tpPoints[1].Set(pTr->tpPoints[1]);
334 tpPoints[0].Set(tr.tpPoints[0]);
335 tpPoints[1].Set(tr.tpPoints[1]);
342 tpPoints[0].Set(pTr->tpPoints[0]);
343 tpPoints[1].Set(pTr->tpPoints[1]);
349 tpPoints[0].Set(tr.tpPoints[0]);
350 tpPoints[1].Set(tr.tpPoints[1]);
357 tpPoints[0].Set(pTr->tpPoints[0]);
358 tpPoints[1].Set(pTr->tpPoints[1]);
364 tpPoints[0].Set(tr.tpPoints[0]);
365 tpPoints[1].Set(tr.tpPoints[1]);
372 tpPoints[0].Set(pTr->tpPoints[0]);
373 tpPoints[1].Set(pTr->tpPoints[1]);
379 tpPoints[0].Set(tr.tpPoints[0]);
380 tpPoints[1].Set(tr.tpPoints[1]);
387 tpPoints[0].Set(pTr->tpPoints[0]);
388 tpPoints[1].Set(pTr->tpPoints[1]);
394 tpPoints[0].Set(tr.tpPoints[0]);
395 tpPoints[1].Set(tr.tpPoints[1]);
402 tpPoints[0].Set(pTr->tpPoints[0]);
403 tpPoints[1].Set(pTr->tpPoints[1]);
409 tpPoints[0].Set(tr.tpPoints[0]);
410 tpPoints[1].Set(tr.tpPoints[1]);
417 tpPoints[0].Set(pTr->tpPoints[0]);
418 tpPoints[1].Set(pTr->tpPoints[1]);
424 tpPoints[0].Set(tr.tpPoints[0]);
425 tpPoints[1].Set(tr.tpPoints[1]);
432 tpPoints[0].Set(pTr->tpPoints[0]);
433 tpPoints[1].Set(pTr->tpPoints[1]);
439 tpPoints[0].Set(tpLB);
440 tpPoints[1].Set(tpUB);
447 tpPoints[0].Set(pTpLB);
448 tpPoints[1].Set(pTpUB);
454 tpPoints[0].Set(tpLB);
455 tpPoints[1].Set(tpUB);
462 tpPoints[0].Set(pTpLB);
463 tpPoints[1].Set(pTpUB);
469 tpPoints[0].Set(tpLB);
470 tpPoints[1].Set(tpUB);
477 tpPoints[0].Set(pTpLB);
478 tpPoints[1].Set(pTpUB);
484 tpPoints[0].Set(tpLB);
485 tpPoints[1].Set(tpUB);
492 tpPoints[0].Set(pTpLB);
493 tpPoints[1].Set(pTpUB);
499 tpPoints[0].Set(tpLB);
500 tpPoints[1].Set(tpUB);
507 tpPoints[0].Set(pTpLB);
508 tpPoints[1].Set(pTpUB);
514 tpPoints[0].Set(tpLB);
515 tpPoints[1].Set(tpUB);
522 tpPoints[0].Set(pTpLB);
523 tpPoints[1].Set(pTpUB);
529 tpPoints[0].Set(tpLB);
530 tpPoints[1].Set(tpUB);
537 tpPoints[0].Set(pTpLB);
538 tpPoints[1].Set(pTpUB);
544 tpPoints[0].Set(tpLB);
545 tpPoints[1].Set(tpUB);
552 tpPoints[0].Set(pTpLB);
553 tpPoints[1].Set(pTpUB);
558 const TRange<T>& operator=(int32_t value)
566 const TRange<T>& operator=(int64_t value)
620 return tpPoints[0] == tr.tpPoints[0] && tpPoints[1] == tr.tpPoints[1];
625 return tpPoints[0] == tr.tpPoints[0] && tpPoints[1] == tr.tpPoints[1];
630 return tpPoints[0] == tr.tpPoints[0] && tpPoints[1] == tr.tpPoints[1];
635 return tpPoints[0] == tr.tpPoints[0] && tpPoints[1] == tr.tpPoints[1];
640 return tpPoints[0] != tr.tpPoints[0] || tpPoints[1] != tr.tpPoints[1];
645 return tpPoints[0] != tr.tpPoints[0] || tpPoints[1] != tr.tpPoints[1];
650 return tpPoints[0] != tr.tpPoints[0] || tpPoints[1] != tr.tpPoints[1];
655 return tpPoints[0] != tr.tpPoints[0] || tpPoints[1] != tr.tpPoints[1];
658 const TRange<T>& operator+=(int32_t value)
660 tpPoints[0] += value;
661 tpPoints[1] += value;
666 const TRange<T>& operator+=(int64_t value)
668 tpPoints[0] += value;
669 tpPoints[1] += value;
676 tpPoints[0] += value;
677 tpPoints[1] += value;
682 const TRange<T>& operator+=(
double value)
684 tpPoints[0] += value;
685 tpPoints[1] += value;
692 tpPoints[0] += tr.tpPoints[0];
693 tpPoints[1] += tr.tpPoints[1];
700 tpPoints[0] += tr.tpPoints[0];
701 tpPoints[1] += tr.tpPoints[1];
708 tpPoints[0] += tr.tpPoints[0];
709 tpPoints[1] += tr.tpPoints[1];
716 tpPoints[0] += tr.tpPoints[0];
717 tpPoints[1] += tr.tpPoints[1];
722 const TRange<T>& operator-=(int32_t value)
724 tpPoints[0] -= value;
725 tpPoints[1] -= value;
730 const TRange<T>& operator-=(int64_t value)
732 tpPoints[0] -= value;
733 tpPoints[1] -= value;
740 tpPoints[0] -= value;
741 tpPoints[1] -= value;
746 const TRange<T>& operator-=(
double value)
748 tpPoints[0] -= value;
749 tpPoints[1] -= value;
756 tpPoints[0] -= tr.tpPoints[0];
757 tpPoints[1] -= tr.tpPoints[1];
764 tpPoints[0] -= tr.tpPoints[0];
765 tpPoints[1] -= tr.tpPoints[1];
772 tpPoints[0] -= tr.tpPoints[0];
773 tpPoints[1] -= tr.tpPoints[1];
780 tpPoints[0] -= tr.tpPoints[0];
781 tpPoints[1] -= tr.tpPoints[1];
786 const TRange<T>& operator*=(int32_t value)
788 tpPoints[0] *= value;
789 tpPoints[1] *= value;
794 const TRange<T>& operator*=(int64_t value)
796 tpPoints[0] *= value;
797 tpPoints[1] *= value;
804 tpPoints[0] *= value;
805 tpPoints[1] *= value;
810 const TRange<T>& operator*=(
double value)
812 tpPoints[0] *= value;
813 tpPoints[1] *= value;
820 tpPoints[0] *= tr.tpPoints[0];
821 tpPoints[1] *= tr.tpPoints[1];
828 tpPoints[0] *= tr.tpPoints[0];
829 tpPoints[1] *= tr.tpPoints[1];
836 tpPoints[0] *= tr.tpPoints[0];
837 tpPoints[1] *= tr.tpPoints[1];
844 tpPoints[0] *= tr.tpPoints[0];
845 tpPoints[1] *= tr.tpPoints[1];
850 const TRange<T>& operator/=(int32_t value)
852 tpPoints[0] /= value;
853 tpPoints[1] /= value;
858 const TRange<T>& operator/=(int64_t value)
860 tpPoints[0] /= value;
861 tpPoints[1] /= value;
868 tpPoints[0] /= value;
869 tpPoints[1] /= value;
874 const TRange<T>& operator/=(
double value)
876 tpPoints[0] /= value;
877 tpPoints[1] /= value;
884 tpPoints[0] /= tr.tpPoints[0];
885 tpPoints[1] /= tr.tpPoints[1];
892 tpPoints[0] /= tr.tpPoints[0];
893 tpPoints[1] /= tr.tpPoints[1];
900 tpPoints[0] /= tr.tpPoints[0];
901 tpPoints[1] /= tr.tpPoints[1];
908 tpPoints[0] /= tr.tpPoints[0];
909 tpPoints[1] /= tr.tpPoints[1];
1157 return TRange<T>(
TPoint<T>((T)(value - tr.tpPoints[0].x), (T)(value - tr.tpPoints[0].y)),
TPoint<T>((T)(value - tr.tpPoints[1].x), (T)(value - tr.tpPoints[1].y)));
1161 return TRange<T>(
TPoint<T>((T)(value - tr.tpPoints[0].x), (T)(value - tr.tpPoints[0].y)),
TPoint<T>((T)(value - tr.tpPoints[1].x), (T)(value - tr.tpPoints[1].y)));
1165 return TRange<T>(
TPoint<T>((T)(value - tr.tpPoints[0].x), (T)(value - tr.tpPoints[0].y)),
TPoint<T>((T)(value - tr.tpPoints[1].x), (T)(value - tr.tpPoints[1].y)));
1169 return TRange<T>(
TPoint<T>((T)(value - tr.tpPoints[0].x), (T)(value - tr.tpPoints[0].y)),
TPoint<T>((T)(value - tr.tpPoints[1].x), (T)(value - tr.tpPoints[1].y)));
1191 return TRange<T>(
TPoint<T>((T)(value / tr.tpPoints[0].x), (T)(value / tr.tpPoints[0].y)),
TPoint<T>((T)(value / tr.tpPoints[1].x), (T)(value / tr.tpPoints[1].y)));
1195 return TRange<T>(
TPoint<T>((T)(value / tr.tpPoints[0].x), (T)(value / tr.tpPoints[0].y)),
TPoint<T>((T)(value / tr.tpPoints[1].x), (T)(value / tr.tpPoints[1].y)));
1199 return TRange<T>(
TPoint<T>((T)(value / tr.tpPoints[0].x), (T)(value / tr.tpPoints[0].y)),
TPoint<T>((T)(value / tr.tpPoints[1].x), (T)(value / tr.tpPoints[1].y)));
1203 return TRange<T>(
TPoint<T>((T)(value / tr.tpPoints[0].x), (T)(value / tr.tpPoints[0].y)),
TPoint<T>((T)(value / tr.tpPoints[1].x), (T)(value / tr.tpPoints[1].y)));
Simplified class representing a point.
Definition TPoint.h:37
Simplified class representing a 2D range.
Definition TRange.h:35
Simplified class representing a rectangle.
Definition TRect.h:37