xmsgrid
1.0
|
3D geometric extents (min/max). More...
Public Member Functions | |
GmExtents3d () | |
constructor | |
GmExtents3d (const GmExtents2d &a_extents) | |
constructor More... | |
GmExtents3d (const Pt3d &a_min, const Pt3d &a_max) | |
constructor More... | |
GmExtents3d (const Pt2d &a_min, const Pt2d &a_max) | |
constructor More... | |
void | operator+= (const GmExtents3d &a_rhs) |
operator += More... | |
void | AddToExtents (const Pt3d &pt) |
Add a point to the extents. More... | |
bool | IsValid () const |
If we don't have any data we return false. More... | |
bool | Overlap (GmExtents3d &a_b) const |
Test to see if two extents overlap. More... | |
void | Clear () |
Resets the extents to defaults. IsValid will return false. | |
bool | IsPointWithin (const Pt3d &pt) const |
Tests if the point is inside the extents. More... | |
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. More... | |
void | GetExtents (Pt3d &a_dMin, Pt3d &a_dMax) const |
Gets the extents via the parameters. More... | |
double | GetMinX () const |
Gets the minimum x. More... | |
double | GetMaxX () const |
Gets the maximum x. More... | |
double | GetMinY () const |
Gets the minimum y. More... | |
double | GetMaxY () const |
Gets the maximum y. More... | |
double | GetMinZ () const |
Gets the minimum z. More... | |
double | GetMaxZ () const |
Gets the maximum z. More... | |
Pt3d | GetMin () const |
Gets the minimum. More... | |
Pt3d | GetMax () const |
Gets the maximum. More... | |
void | Set (const Pt3d &a_min, const Pt3d &a_max) |
Sets the min/max. More... | |
template<typename Archive > | |
void | serialize (Archive &archive, const unsigned int version) |
Boost serialize function. More... | |
Static Public Member Functions | |
static void | SetTolerance (double a_Tol) |
Sets the tolerance to use. More... | |
static double | GetTolerance () |
Gets the tolerance in use. More... | |
Protected Attributes | |
Pt3d | m_min |
Minimum, maximum extents. | |
Pt3d | m_max |
Maximum, maximum extents. | |
Static Protected Attributes | |
static double | m_tolerance |
Tolerance used in comparisons. More... | |
3D geometric extents (min/max).
Definition at line 107 of file GmExtents.h.
|
explicit |
constructor
a_extents | GmExtents2d. |
Definition at line 297 of file GmExtents.cpp.
References xms::GmExtents2d::GetMax(), xms::GmExtents2d::GetMin(), m_max, and m_min.
void xms::GmExtents3d::AddToExtents | ( | const Pt3d & | pt | ) |
Add a point to the extents.
[in] | pt | A point |
Definition at line 319 of file GmExtents.cpp.
References m_max, m_min, xms::Pt3< T >::x, xms::Pt3< T >::y, and xms::Pt3< T >::z.
Referenced by GmExtents3dUnitTests::testMultiplePts(), GmExtents3dUnitTests::testOverlapping(), and GmExtents3dUnitTests::testSinglePt().
void xms::GmExtents3d::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.
[out] | a_MinX | Minimum x. |
[out] | a_MaxX | Maximum x. |
[out] | a_MinY | Minimum y. |
[out] | a_MaxY | Maximum y. |
[out] | a_MinZ | Minimum z. |
[out] | a_MaxZ | Maximum z. |
Definition at line 417 of file GmExtents.cpp.
References m_max, m_min, xms::Pt3< T >::x, xms::Pt3< T >::y, and xms::Pt3< T >::z.
Gets the extents via the parameters.
[out] | a_dMin | Minimum. |
[out] | a_dMax | Maximum. |
Definition at line 454 of file GmExtents.cpp.
Pt3d xms::GmExtents3d::GetMax | ( | ) | const |
Gets the maximum.
Definition at line 519 of file GmExtents.cpp.
References m_max.
Referenced by xms::GmExtents2d::GmExtents2d().
double xms::GmExtents3d::GetMaxX | ( | ) | const |
Gets the maximum x.
Definition at line 471 of file GmExtents.cpp.
References m_max, and xms::Pt3< T >::x.
Referenced by GmExtents3dUnitTests::testMultiplePts(), and GmExtents3dUnitTests::testSinglePt().
double xms::GmExtents3d::GetMaxY | ( | ) | const |
Gets the maximum y.
Definition at line 487 of file GmExtents.cpp.
References m_max, and xms::Pt3< T >::y.
Referenced by GmExtents3dUnitTests::testMultiplePts(), and GmExtents3dUnitTests::testSinglePt().
double xms::GmExtents3d::GetMaxZ | ( | ) | const |
Gets the maximum z.
Definition at line 503 of file GmExtents.cpp.
References m_max, and xms::Pt3< T >::z.
Referenced by GmExtents3dUnitTests::testMultiplePts(), and GmExtents3dUnitTests::testSinglePt().
Pt3d xms::GmExtents3d::GetMin | ( | ) | const |
Gets the minimum.
Definition at line 511 of file GmExtents.cpp.
References m_min.
Referenced by xms::GmExtents2d::GmExtents2d().
double xms::GmExtents3d::GetMinX | ( | ) | const |
Gets the minimum x.
Definition at line 463 of file GmExtents.cpp.
References m_min, and xms::Pt3< T >::x.
Referenced by GmExtents3dUnitTests::testMultiplePts(), and GmExtents3dUnitTests::testSinglePt().
double xms::GmExtents3d::GetMinY | ( | ) | const |
Gets the minimum y.
Definition at line 479 of file GmExtents.cpp.
References m_min, and xms::Pt3< T >::y.
Referenced by GmExtents3dUnitTests::testMultiplePts(), and GmExtents3dUnitTests::testSinglePt().
double xms::GmExtents3d::GetMinZ | ( | ) | const |
Gets the minimum z.
Definition at line 495 of file GmExtents.cpp.
References m_min, and xms::Pt3< T >::z.
Referenced by GmExtents3dUnitTests::testMultiplePts(), and GmExtents3dUnitTests::testSinglePt().
|
static |
Gets the tolerance in use.
Definition at line 348 of file GmExtents.cpp.
References m_tolerance.
Referenced by GmExtents3dUnitTests::testOverlapping().
bool xms::GmExtents3d::IsPointWithin | ( | const Pt3d & | pt | ) | const |
Tests if the point is inside the extents.
[out] | pt | A point |
Definition at line 403 of file GmExtents.cpp.
References m_max, m_min, xms::Pt3< T >::x, xms::Pt3< T >::y, and xms::Pt3< T >::z.
bool xms::GmExtents3d::IsValid | ( | ) | const |
If we don't have any data we return false.
Definition at line 332 of file GmExtents.cpp.
References m_max, m_min, and xms::Pt3< T >::x.
Referenced by GmExtents3dUnitTests::testMultiplePts(), GmExtents3dUnitTests::testNoPts(), GmExtents3dUnitTests::testOverlapping(), and GmExtents3dUnitTests::testSinglePt().
void xms::GmExtents3d::operator+= | ( | const GmExtents3d & | a_rhs | ) |
operator +=
[in] | a_rhs | GmExtents2d |
Definition at line 306 of file GmExtents.cpp.
References m_max, m_min, xms::Pt3< T >::x, xms::Pt3< T >::y, and xms::Pt3< T >::z.
bool xms::GmExtents3d::Overlap | ( | GmExtents3d & | a_b | ) | const |
Test to see if two extents overlap.
[in] | a_b | The other extents. |
Definition at line 357 of file GmExtents.cpp.
References m_max, m_min, m_tolerance, xms::Pt3< T >::x, xms::Pt3< T >::y, and xms::Pt3< T >::z.
Referenced by GmExtents3dUnitTests::testOverlapping().
void xms::GmExtents3d::serialize | ( | Archive & | archive, |
const unsigned int | version | ||
) |
Boost serialize function.
[in,out] | archive | An archive. |
[in] | version | The version number. |
Definition at line 162 of file GmExtents.h.
References m_max, m_min, and m_tolerance.
Sets the min/max.
[in] | a_min | The minimum extents. |
[in] | a_max | The maximum extents. |
Definition at line 528 of file GmExtents.cpp.
|
static |
Sets the tolerance to use.
[in] | a_Tol | The tolerance. |
Definition at line 340 of file GmExtents.cpp.
References m_tolerance.
Referenced by GmExtents3dUnitTests::testOverlapping().
|
staticprotected |
Tolerance used in comparisons.
Tolerance. Static ?
Definition at line 153 of file GmExtents.h.
Referenced by GetTolerance(), Overlap(), serialize(), and SetTolerance().