xmsgrid  1.0
GmExtents.cpp
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
6 //------------------------------------------------------------------------------
7 
8 //----- Included files ---------------------------------------------------------
9 
10 // 1. Precompiled header
11 
12 // 2. My header
14 
15 // 3. Standard Library Headers
16 
17 // 4. External Library Headers
18 
19 // 5. Shared Headers
20 #include <boost/serialization/export.hpp>
21 #include <boost/serialization/vector.hpp>
22 #include <xmscore/math/math.h>
23 #include <xmscore/misc/XmConst.h>
24 
25 // 6. Non-shared Headers
26 
27 using namespace xms;
28 
29 //----- Namespace declaration --------------------------------------------------
30 
31 namespace xms
32 {
37 //------------------------------------------------------------------------------
39 //------------------------------------------------------------------------------
41 {
42  Clear();
43 } // GmExtents2d::GmExtents2d
44 //------------------------------------------------------------------------------
47 //------------------------------------------------------------------------------
49 {
50  m_min = static_cast<Pt2d>(a_extents.GetMin());
51  m_max = static_cast<Pt2d>(a_extents.GetMax());
52 }
53 //------------------------------------------------------------------------------
57 //------------------------------------------------------------------------------
58 GmExtents2d::GmExtents2d(const Pt2d& a_min, const Pt2d& a_max)
59 : m_min(a_min)
60 , m_max(a_max)
61 {
62 } // GmExtents2d::GmExtents2d
63 //------------------------------------------------------------------------------
67 //------------------------------------------------------------------------------
68 GmExtents2d::GmExtents2d(const Pt3d& a_min, const Pt3d& a_max)
69 : m_min(a_min)
70 , m_max(a_max)
71 {
72 } // GmExtents2d::GmExtents2d
73 //------------------------------------------------------------------------------
75 //------------------------------------------------------------------------------
77 {
78 } // GmExtents2d::~GmExtents2d
79 //------------------------------------------------------------------------------
82 //------------------------------------------------------------------------------
84 {
85  m_min.x = std::min(m_min.y, a_rhs.m_min.x);
86  m_max.x = std::max(m_max.x, a_rhs.m_max.x);
87  m_min.y = std::min(m_min.y, a_rhs.m_min.y);
88  m_max.y = std::max(m_max.y, a_rhs.m_max.y);
89 } // GmExtents2d::operator +=
90 //------------------------------------------------------------------------------
93 //------------------------------------------------------------------------------
95 {
96  Pt3d thePt(pt);
97 
98  m_min.x = std::min(m_min.x, thePt.x);
99  m_max.x = std::max(m_max.x, thePt.x);
100  m_min.y = std::min(m_min.y, thePt.y);
101  m_max.y = std::max(m_max.y, thePt.y);
102 } // GmExtents2d::AddToExtents.
103 //------------------------------------------------------------------------------
106 //------------------------------------------------------------------------------
108 {
109  return (m_min.x <= m_max.x);
110 } // GmExtents2d::IsValid
111 //------------------------------------------------------------------------------
114 //------------------------------------------------------------------------------
115 void GmExtents2d::SetTolerance(double a_Tol)
116 {
117  m_tolerance = a_Tol;
118 } // GmExtents2d::SetTolerance
119 //------------------------------------------------------------------------------
122 //------------------------------------------------------------------------------
124 {
125  return m_tolerance;
126 } // GmExtents2d::GetTolerance
127 //------------------------------------------------------------------------------
131 //------------------------------------------------------------------------------
132 bool GmExtents2d::Overlap(const GmExtents2d& a_b) const
133 {
134  // We add (or subtract) the tolerance to our mins and maxs to get
135  // modified boundaries
136  Pt2d modMin = m_min - m_tolerance;
137  Pt2d modMax = m_max + m_tolerance;
138 
139  if (a_b.m_min.x > modMax.x)
140  {
141  return false;
142  }
143  if (a_b.m_max.x < modMin.x)
144  {
145  return false;
146  }
147  if (a_b.m_min.y > modMax.y)
148  {
149  return false;
150  }
151  if (a_b.m_max.y < modMin.y)
152  {
153  return false;
154  }
155  return true;
156 } // GmExtents2d::Overlap
157 //------------------------------------------------------------------------------
159 //------------------------------------------------------------------------------
161 {
162  m_min = XM_DBL_HIGHEST;
163  m_max = XM_DBL_LOWEST;
164 } // GmExtents2d::Clear
165 //------------------------------------------------------------------------------
171 //------------------------------------------------------------------------------
172 void GmExtents2d::GetExtents(double* a_MinX, double* a_MaxX, double* a_MinY, double* a_MaxY)
173 {
174  if (a_MinX)
175  {
176  *a_MinX = m_min.x;
177  }
178  if (a_MaxX)
179  {
180  *a_MaxX = m_max.x;
181  }
182  if (a_MinY)
183  {
184  *a_MinY = m_min.y;
185  }
186  if (a_MaxY)
187  {
188  *a_MaxY = m_max.y;
189  }
190 } // GmExtents2d::GetExtents
191 //------------------------------------------------------------------------------
195 //------------------------------------------------------------------------------
196 void GmExtents2d::GetExtents(Pt3d& a_dMin, Pt3d& a_dMax)
197 {
198  a_dMin = m_min;
199  a_dMax = m_max;
200 } // GmExtents2d::GetExtents
201 //------------------------------------------------------------------------------
204 //------------------------------------------------------------------------------
205 double GmExtents2d::GetMinX() const
206 {
207  return m_min.x;
208 } // GmExtents2d::GetMinX
209 //------------------------------------------------------------------------------
212 //------------------------------------------------------------------------------
213 double GmExtents2d::GetMaxX() const
214 {
215  return m_max.x;
216 } // GmExtents2d::GetMaxX
217 //------------------------------------------------------------------------------
220 //------------------------------------------------------------------------------
221 double GmExtents2d::GetMinY() const
222 {
223  return m_min.y;
224 } // GmExtents2d::GetMinY
225 //------------------------------------------------------------------------------
228 //------------------------------------------------------------------------------
229 double GmExtents2d::GetMaxY() const
230 {
231  return m_max.y;
232 } // GmExtents2d::GetMaxY
233 //------------------------------------------------------------------------------
236 //------------------------------------------------------------------------------
238 {
239  return m_min;
240 } // GmExtents2d::GetMin
241 //------------------------------------------------------------------------------
244 //------------------------------------------------------------------------------
246 {
247  return m_max;
248 } // GmExtents2d::GetMax
249 //------------------------------------------------------------------------------
253 //------------------------------------------------------------------------------
254 void GmExtents2d::Set(const Pt2d& a_min, const Pt2d& a_max)
255 {
256  m_min = a_min;
257  m_max = a_max;
258 } // GmExtents2d::Set
259 
260 double GmExtents2d::m_tolerance(0.0);
261 
266 //------------------------------------------------------------------------------
268 //------------------------------------------------------------------------------
270 {
271  Clear();
272 } // GmExtents3d::GmExtents3d
273 //------------------------------------------------------------------------------
277 //------------------------------------------------------------------------------
278 GmExtents3d::GmExtents3d(const Pt3d& a_min, const Pt3d& a_max)
279 : m_min(a_min)
280 , m_max(a_max)
281 {
282 } // GmExtents3d::GmExtents3d
283 //------------------------------------------------------------------------------
287 //------------------------------------------------------------------------------
288 GmExtents3d::GmExtents3d(const Pt2d& a_min, const Pt2d& a_max)
289 : m_min(a_min)
290 , m_max(a_max)
291 {
292 } // GmExtents3d::GmExtents3d
293 //------------------------------------------------------------------------------
296 //------------------------------------------------------------------------------
298 {
299  m_min = static_cast<Pt3d>(a_extents.GetMin());
300  m_max = static_cast<Pt3d>(a_extents.GetMax());
301 }
302 //------------------------------------------------------------------------------
305 //------------------------------------------------------------------------------
307 {
308  m_min.x = std::min(m_min.x, a_rhs.m_min.x);
309  m_max.x = std::max(m_max.x, a_rhs.m_max.x);
310  m_min.y = std::min(m_min.y, a_rhs.m_min.y);
311  m_max.y = std::max(m_max.y, a_rhs.m_max.y);
312  m_min.z = std::min(m_min.z, a_rhs.m_min.z);
313  m_max.z = std::max(m_max.z, a_rhs.m_max.z);
314 } // GmExtents3d::operator +=
315 //------------------------------------------------------------------------------
318 //------------------------------------------------------------------------------
320 {
321  m_min.x = std::min(m_min.x, pt.x);
322  m_max.x = std::max(m_max.x, pt.x);
323  m_min.y = std::min(m_min.y, pt.y);
324  m_max.y = std::max(m_max.y, pt.y);
325  m_min.z = std::min(m_min.z, pt.z);
326  m_max.z = std::max(m_max.z, pt.z);
327 } // GmExtents3d::AddToExtents
328 //------------------------------------------------------------------------------
331 //------------------------------------------------------------------------------
333 {
334  return (m_min.x <= m_max.x);
335 } // GmExtents3d::IsValid
336 //------------------------------------------------------------------------------
339 //------------------------------------------------------------------------------
340 void GmExtents3d::SetTolerance(double a_Tol)
341 {
342  m_tolerance = a_Tol;
343 } // GmExtents3d::SetTolerance
344 //------------------------------------------------------------------------------
347 //------------------------------------------------------------------------------
349 {
350  return m_tolerance;
351 } // GmExtents3d::GetTolerance
352 //------------------------------------------------------------------------------
356 //------------------------------------------------------------------------------
358 {
359  // We add (or subtract) the tolerance to our mins and maxs to get
360  // modified boundaries
361  Pt3d modMin = m_min - m_tolerance;
362  Pt3d modMax = m_max + m_tolerance;
363 
364  if (a_b.m_min.x > modMax.x)
365  {
366  return false;
367  }
368  if (a_b.m_max.x < modMin.x)
369  {
370  return false;
371  }
372  if (a_b.m_min.y > modMax.y)
373  {
374  return false;
375  }
376  if (a_b.m_max.y < modMin.y)
377  {
378  return false;
379  }
380  if (a_b.m_min.z > modMax.z)
381  {
382  return false;
383  }
384  if (a_b.m_max.z < modMin.z)
385  {
386  return false;
387  }
388  return true;
389 } // GmExtents3d::Overlap
390 //------------------------------------------------------------------------------
392 //------------------------------------------------------------------------------
394 {
395  m_min = XM_DBL_HIGHEST;
396  m_max = XM_DBL_LOWEST;
397 } // GmExtents3d::Clear
398 //------------------------------------------------------------------------------
402 //------------------------------------------------------------------------------
403 bool GmExtents3d::IsPointWithin(const Pt3d& pt) const
404 {
405  return (m_min.x <= pt.x && m_max.x >= pt.x && m_min.y <= pt.y && m_max.y >= pt.y &&
406  m_min.z <= pt.z && m_max.z >= pt.z);
407 } // GmExtents3d::IsPointWithin
408 //------------------------------------------------------------------------------
416 //------------------------------------------------------------------------------
417 void GmExtents3d::GetExtents(double* a_MinX,
418  double* a_MaxX,
419  double* a_MinY,
420  double* a_MaxY,
421  double* a_MinZ,
422  double* a_MaxZ) const
423 {
424  if (a_MinX)
425  {
426  *a_MinX = m_min.x;
427  }
428  if (a_MaxX)
429  {
430  *a_MaxX = m_max.x;
431  }
432  if (a_MinY)
433  {
434  *a_MinY = m_min.y;
435  }
436  if (a_MaxY)
437  {
438  *a_MaxY = m_max.y;
439  }
440  if (a_MinZ)
441  {
442  *a_MinZ = m_min.z;
443  }
444  if (a_MaxZ)
445  {
446  *a_MaxZ = m_max.z;
447  }
448 } // GmExtents3d::GetExtents
449 //------------------------------------------------------------------------------
453 //------------------------------------------------------------------------------
454 void GmExtents3d::GetExtents(Pt3d& a_dMin, Pt3d& a_dMax) const
455 {
456  a_dMin = m_min;
457  a_dMax = m_max;
458 } // GmExtents3d::GetExtents
459 //------------------------------------------------------------------------------
462 //------------------------------------------------------------------------------
463 double GmExtents3d::GetMinX() const
464 {
465  return m_min.x;
466 } // GmExtents3d::GetMinX
467 //------------------------------------------------------------------------------
470 //------------------------------------------------------------------------------
471 double GmExtents3d::GetMaxX() const
472 {
473  return m_max.x;
474 } // GmExtents3d::GetMaxX
475 //------------------------------------------------------------------------------
478 //------------------------------------------------------------------------------
479 double GmExtents3d::GetMinY() const
480 {
481  return m_min.y;
482 } // GmExtents3d::GetMinY
483 //------------------------------------------------------------------------------
486 //------------------------------------------------------------------------------
487 double GmExtents3d::GetMaxY() const
488 {
489  return m_max.y;
490 } // GmExtents3d::GetMaxY
491 //------------------------------------------------------------------------------
494 //------------------------------------------------------------------------------
495 double GmExtents3d::GetMinZ() const
496 {
497  return m_min.z;
498 } // GmExtents3d::GetMinZ
499 //------------------------------------------------------------------------------
502 //------------------------------------------------------------------------------
503 double GmExtents3d::GetMaxZ() const
504 {
505  return m_max.z;
506 } // GmExtents3d::GetMaxZ
507 //------------------------------------------------------------------------------
510 //------------------------------------------------------------------------------
512 {
513  return m_min;
514 } // GmExtents3d::GetMin
515 //------------------------------------------------------------------------------
518 //------------------------------------------------------------------------------
520 {
521  return m_max;
522 } // GmExtents3d::GetMax
523 //------------------------------------------------------------------------------
527 //------------------------------------------------------------------------------
528 void GmExtents3d::Set(const Pt3d& a_min, const Pt3d& a_max)
529 {
530  m_min = a_min;
531  m_max = a_max;
532 } // GmExtents3d::Set
533 
534 double GmExtents3d::m_tolerance(1.0e-6);
535 
536 } // namespace xms
537 
539 #ifdef CXX_TEST
540 
542 
543 //----- Namespace declaration --------------------------------------------------
544 
545 // namespace xms {
546 using namespace xms;
547 
552 //------------------------------------------------------------------------------
554 //------------------------------------------------------------------------------
556 {
557  GmExtents3d e;
558 
559  Pt3d pt(50.0, 60.0, 80.0);
560 
561  e.AddToExtents(pt);
562 
563  TS_ASSERT(e.IsValid());
564  const double kDelta = 0.000001;
565  TS_ASSERT_DELTA(50.0, e.GetMinX(), kDelta);
566  TS_ASSERT_DELTA(50.0, e.GetMaxX(), kDelta);
567  TS_ASSERT_DELTA(60.0, e.GetMinY(), kDelta);
568  TS_ASSERT_DELTA(60.0, e.GetMaxY(), kDelta);
569  TS_ASSERT_DELTA(80.0, e.GetMinZ(), kDelta);
570  TS_ASSERT_DELTA(80.0, e.GetMaxZ(), kDelta);
571 } // GmExtents3dUnitTests::testSinglePt
572 //------------------------------------------------------------------------------
574 //------------------------------------------------------------------------------
576 {
577  GmExtents3d e;
578 
579  Pt3d pt(50.0, 60.0, 80.0);
580 
581  e.AddToExtents(pt);
582 
583  pt.Set(100.0, 120.0, 160.0);
584  e.AddToExtents(pt);
585  pt.Set(200.0, -100.0, -200.0);
586  e.AddToExtents(pt);
587 
588  TS_ASSERT(e.IsValid());
589  const double kDelta = 0.000001;
590  TS_ASSERT_DELTA(50.0, e.GetMinX(), kDelta);
591  TS_ASSERT_DELTA(200.0, e.GetMaxX(), kDelta);
592  TS_ASSERT_DELTA(-100.0, e.GetMinY(), kDelta);
593  TS_ASSERT_DELTA(120.0, e.GetMaxY(), kDelta);
594  TS_ASSERT_DELTA(-200.0, e.GetMinZ(), kDelta);
595  TS_ASSERT_DELTA(160.0, e.GetMaxZ(), kDelta);
596 } // GmExtents3dUnitTests::testMultiplePts
597 //------------------------------------------------------------------------------
599 //------------------------------------------------------------------------------
601 {
602  GmExtents3d e;
603 
604  TS_ASSERT(!e.IsValid());
605 
606 } // GmExtents3dUnitTests::testNoPts
607 //------------------------------------------------------------------------------
609 //------------------------------------------------------------------------------
611 {
612  {
613  GmExtents3d e, f;
614  // x -100 to -50, y 50 to 100, z -25 to 25
615  Pt3d pt(-100.0, 50.0, -25.0);
616  e.AddToExtents(pt);
617  pt.Set(-50.0, 100.0, -25.0);
618  e.AddToExtents(pt);
619  pt.Set(-50.0, 100.0, 25.0);
620  e.AddToExtents(pt);
621 
622  // x -150 to -40, y 25 to 75, z -15 to 55
623  pt.Set(-150.0, 30.0, 55.0);
624  f.AddToExtents(pt);
625  pt.Set(-50.0, 25.0, -5.0);
626  f.AddToExtents(pt);
627  pt.Set(-40.0, 75.0, -15.0);
628  f.AddToExtents(pt);
629 
630  TS_ASSERT(e.IsValid());
631  TS_ASSERT(f.IsValid());
632  TS_ASSERT_EQUALS(e.Overlap(f), true);
633 
634  // x -550 to -101, y 101 to 251, z -125 to -26
635  f.Clear();
636  pt.Set(-101.0, 101.0, -125.0);
637  f.AddToExtents(pt);
638  pt.Set(-550.0, 182.0, -98.0);
639  f.AddToExtents(pt);
640  pt.Set(-150.0, 251.0, -26.0);
641  f.AddToExtents(pt);
642 
643  TS_ASSERT_EQUALS(e.Overlap(f), false);
644 
645  // x -150 to -100+, y 50 to 100, z -25 to 25
646  f.SetTolerance(0.01);
647  f.Clear();
648  pt.Set(-100.0 - 2 * f.GetTolerance(), 50.0, -25.0);
649  f.AddToExtents(pt);
650  pt.Set(-150.0, 100.0, -25.0);
651  f.AddToExtents(pt);
652  pt.Set(-150.0, 100.0, 25.0);
653  f.AddToExtents(pt);
654 
655  TS_ASSERT_EQUALS(e.Overlap(f), false);
656  }
657  //--------------------------------------------------
658  {
659  GmExtents2d e, f;
660 
661  Pt3d pt(-100.0, 50.0, 0);
662  e.AddToExtents(pt);
663  pt.Set(-50.0, 100.0, 0);
664  e.AddToExtents(pt);
665 
666  pt.Set(-150.0, 25.0, 0);
667  f.AddToExtents(pt);
668  pt.Set(-101.0, 75.0, 0);
669  f.AddToExtents(pt);
670 
671  // x -100 to -50, y 50 to 100
672  // x -150 to -101, y 25 to 75
673  // X Y
674  // |-------| |--------|
675  // |-------| |--------|
676  TS_ASSERT(e.IsValid());
677  TS_ASSERT(f.IsValid());
678  TS_ASSERT_EQUALS(e.Overlap(f), false);
679 
680  f.Clear();
681  pt.Set(-550.0, 251.0, 0);
682  f.AddToExtents(pt);
683  pt.Set(-101.0, 101.0, 0);
684  f.AddToExtents(pt);
685 
686  // x -100 to -50, y 50 to 100
687  // x -550 to -101, y 101 to 251
688  // X Y
689  // |-------| |--------|
690  // |-------| |--------|
691  TS_ASSERT_EQUALS(e.Overlap(f), false);
692 
693  // x -100 to -50, y 50 to 100
694  // x -150 to -100+, y -50 to 75
695  // X Y
696  // |-------| |--------|
697  // |-------| |--------|
698  f.Clear();
699  pt.Set(-100.0 - 2 * f.GetTolerance(), -50.0, 0);
700  f.AddToExtents(pt);
701  pt.Set(-150.0, 75.0, 0);
702  f.AddToExtents(pt);
703 
704  TS_ASSERT_EQUALS(e.Overlap(f), true);
705 
706  // x -100 to -50, y 50 to 100
707  // x -75 to -60, y -50 to 75
708  // X Y
709  // |-----------| |--------|
710  // |-------| |------------|
711  f.Clear();
712  pt.Set(-75.0 - f.GetTolerance(), 25.0, 0);
713  f.AddToExtents(pt);
714  pt.Set(-60.0, 125.0, 0);
715  f.AddToExtents(pt);
716 
717  TS_ASSERT_EQUALS(e.Overlap(f), true);
718  }
719 } // GmExtents3dUnitTests::testOverlapping
720 
721  //} // namespace xms
722 
723 #endif
bool Overlap(const GmExtents2d &a_b) const
Test to see if two extents overlap.
Definition: GmExtents.cpp:132
Pt2d GetMin() const
Gets the minimum.
Definition: GmExtents.cpp:237
double GetMinX() const
Gets the minimum x.
Definition: GmExtents.cpp:463
Pt3d GetMin() const
Gets the minimum.
Definition: GmExtents.cpp:511
bool IsValid()
If we don&#39;t have any data we return false.
Definition: GmExtents.cpp:107
double GetMaxY() const
Gets the maximum y.
Definition: GmExtents.cpp:229
static double GetTolerance()
Gets the tolerance in use.
Definition: GmExtents.cpp:348
void GetExtents(double *a_MinX, double *a_MaxX, double *a_MinY, double *a_MaxY)
Gets the extents via the parameters.
Definition: GmExtents.cpp:172
bool IsValid() const
If we don&#39;t have any data we return false.
Definition: GmExtents.cpp:332
Pt2d m_max
Maximum, maximum extents.
Definition: GmExtents.h:73
virtual void AddToExtents(const Pt3d &pt)
Add a point to the extents.
Definition: GmExtents.cpp:94
Pt3d GetMax() const
Gets the maximum.
Definition: GmExtents.cpp:519
Pt2d GetMax() const
Gets the maximum.
Definition: GmExtents.cpp:245
static void SetTolerance(double a_Tol)
Sets the tolerance to use.
Definition: GmExtents.cpp:115
3D geometric extents (min/max).
Definition: GmExtents.h:107
GmExtents3d()
constructor
Definition: GmExtents.cpp:269
bool IsPointWithin(const Pt3d &pt) const
Tests if the point is inside the extents.
Definition: GmExtents.cpp:403
bool Overlap(GmExtents3d &a_b) const
Test to see if two extents overlap.
Definition: GmExtents.cpp:357
void testOverlapping()
Tests overlap.
Definition: GmExtents.cpp:610
void Set(const Pt3d &a_min, const Pt3d &a_max)
Sets the min/max.
Definition: GmExtents.cpp:528
double GetMaxY() const
Gets the maximum y.
Definition: GmExtents.cpp:487
void testSinglePt()
Tests a single point.
Definition: GmExtents.cpp:555
double GetMinY() const
Gets the minimum y.
Definition: GmExtents.cpp:221
static double m_tolerance
Tolerance used in comparisons.
Definition: GmExtents.h:153
GmExtents2d()
constructor
Definition: GmExtents.cpp:40
double GetMaxZ() const
Gets the maximum z.
Definition: GmExtents.cpp:503
void GetExtents(double *a_MinX, double *a_MaxX, double *a_MinY, double *a_MaxY, double *a_MinZ, double *a_MaxZ) const
Gets the extents via the parameters.
Definition: GmExtents.cpp:417
static double m_tolerance
Tolerance used in comparisons.
Definition: GmExtents.h:74
void testMultiplePts()
Tests multiple points.
Definition: GmExtents.cpp:575
double GetMinZ() const
Gets the minimum z.
Definition: GmExtents.cpp:495
void testNoPts()
Tests no points.
Definition: GmExtents.cpp:600
void Set(const Pt2d &a_min, const Pt2d &a_max)
Sets the min/max.
Definition: GmExtents.cpp:254
void Set(T a_x, T a_y, T a_z)
XMS Namespace.
Definition: geoms.cpp:34
static void SetTolerance(double a_Tol)
Sets the tolerance to use.
Definition: GmExtents.cpp:340
void operator+=(const GmExtents2d &a_rhs)
operator +=
Definition: GmExtents.cpp:83
double GetMaxX() const
Gets the maximum x.
Definition: GmExtents.cpp:471
void AddToExtents(const Pt3d &pt)
Add a point to the extents.
Definition: GmExtents.cpp:319
double GetMinY() const
Gets the minimum y.
Definition: GmExtents.cpp:479
void Clear()
Resets the extents to defaults. IsValid will return false.
Definition: GmExtents.cpp:160
2D geometric extents (min/max).
Definition: GmExtents.h:36
Pt3d m_max
Maximum, maximum extents.
Definition: GmExtents.h:152
void Clear()
Resets the extents to defaults. IsValid will return false.
Definition: GmExtents.cpp:393
double GetMinX() const
Gets the minimum x.
Definition: GmExtents.cpp:205
static double GetTolerance()
Gets the tolerance in use.
Definition: GmExtents.cpp:123
Pt3d m_min
Minimum, maximum extents.
Definition: GmExtents.h:151
double GetMaxX() const
Gets the maximum x.
Definition: GmExtents.cpp:213
virtual ~GmExtents2d()
destructor
Definition: GmExtents.cpp:76
void operator+=(const GmExtents3d &a_rhs)
operator +=
Definition: GmExtents.cpp:306
Pt2d m_min
Minimum, maximum extents.
Definition: GmExtents.h:72