![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
This is a helper class which manages and maintains the bounding boxes for 3d primitives.
It allows limited geometric manipulation, but principally deals with the extent of the bounding box.
This bounding box deals with latitude longitude and height.
See also: TSL3DDrawingSurface: geocentricToGeodetic, geodeticToGeocentric, geocentricTo World, geodeticToWorld
Public Member Functions | |
TSL3DBoundingBox () | |
TSL3DBoundingBox (const TSL3DCoord &bottomLeft, const TSL3DCoord &topRight) | |
TSL3DBoundingBox (double lat1, double lon1, double alt1, double lat2, double lon2, double alt2) | |
TSL3DBoundingBox (const TSL3DBoundingBox &rhs) | |
~TSL3DBoundingBox () | |
double | altMax () const |
double | altMin () const |
TSL3DCoord | bottomLeft () const |
TSL3DCoord | centre () const |
void | corners (const TSL3DCoord &bottomLeft, const TSL3DCoord &topRight) |
void | corners (double lat1, double lon1, double alt1, double lat2, double lon2, double alt2) |
double | depth () const |
void | expandToInclude (const TSL3DBoundingBox &includeBBox) |
void | expandToInclude (const TSL3DCoord &coord) |
void | getGeocentricCorners (double &blX, double &blY, double &blZ, double &trX, double &trY, double &trZ) const |
double | height () const |
bool | intersect (const TSL3DBoundingBox &bBox) const |
double | lonMax () const |
double | lonMin () const |
double | latMin () const |
double | latMax () const |
bool | operator== (const TSL3DBoundingBox &rhs) const |
bool | operator!= (const TSL3DBoundingBox &rhs) const |
TSL3DBoundingBox & | operator= (const TSL3DBoundingBox &anotherBoundingBox) |
void | reset (const TSL3DCoord &coord) |
void | rotate (const TSL3DCoord &rotationPoint, double angle) |
TSL3DCoord | topRight () const |
void | translate (double dLat, double dLon, double dAlt) |
double | width () const |
void const * | ibb () const |
void | ibb (void const *ibbp) |
TSL3DBoundingBox (const void *ibbp) | |
TSL3DBoundingBox::TSL3DBoundingBox | ( | ) |
TSL3DBoundingBox::TSL3DBoundingBox | ( | const TSL3DCoord & | bottomLeft, |
const TSL3DCoord & | topRight ) |
Creates a new bounding box and sets both corners of the bounding box.
Although the arguments are typically bottom left and top right corners, the lat, long and alt values are sorted into the appropriate corner.
bottomLeft | TSL3DCoord containing the bottom left corner of the extent. |
topRight | TSL3DCoord containing the top right corner of the extent. |
TSL3DBoundingBox::TSL3DBoundingBox | ( | double | lat1, |
double | lon1, | ||
double | alt1, | ||
double | lat2, | ||
double | lon2, | ||
double | alt2 ) |
Creates a new bounding box and sets both corners of the bounding box.
Although the arguments are typically bottom left and top right corners, the lat, long and alt values are sorted into the appropriate corner.
(lat1,lon1,alt1) | Corner of the extent. |
(lat2,lon2,alt2) | Opposite corner of the extent. |
TSL3DBoundingBox::TSL3DBoundingBox | ( | const TSL3DBoundingBox & | rhs | ) |
Copy constructor
TSL3DBoundingBox::~TSL3DBoundingBox | ( | ) |
TSL3DBoundingBox::TSL3DBoundingBox | ( | const void * | ibbp | ) |
double TSL3DBoundingBox::altMax | ( | ) | const |
Query the maximum altitude value of the bounding box.
double TSL3DBoundingBox::altMin | ( | ) | const |
Query the minimum altitude of the bounding box.
TSL3DCoord TSL3DBoundingBox::bottomLeft | ( | ) | const |
TSL3DCoord TSL3DBoundingBox::centre | ( | ) | const |
Returns the center of the bounding box.
void TSL3DBoundingBox::corners | ( | const TSL3DCoord & | bottomLeft, |
const TSL3DCoord & | topRight ) |
Sets both corners of the bounding box.
Although the arguments are typically bottom left and top right corners, the lat, long and alt values are sorted into the appropriate corner.
bottomLeft | TSL3DCoord containing the bottom left corner of the extent. |
topRight | TSL3DCoord containing the top right corner of the extent. |
void TSL3DBoundingBox::corners | ( | double | lat1, |
double | lon1, | ||
double | alt1, | ||
double | lat2, | ||
double | lon2, | ||
double | alt2 ) |
Sets both corners of the bounding box.
Although the arguments are typically bottom left and top right corners, the lat, long and alt values are sorted into the appropriate corner.
(lat1,lon1,alt1) | Corner of the extent. |
(lat2,lon2,alt2) | Opposite corner of the extent. |
double TSL3DBoundingBox::depth | ( | ) | const |
Returns the depth (altitude).
void TSL3DBoundingBox::expandToInclude | ( | const TSL3DBoundingBox & | includeBBox | ) |
Expand a bounding box to include the specified bounding box
includeBBox | the bounding box which should be contained by this bounding box. |
void TSL3DBoundingBox::expandToInclude | ( | const TSL3DCoord & | coord | ) |
Expand a bounding box to include the specified point
coord | the point which should be contained by this bounding box. |
void TSL3DBoundingBox::getGeocentricCorners | ( | double & | blX, |
double & | blY, | ||
double & | blZ, | ||
double & | trX, | ||
double & | trY, | ||
double & | trZ ) const |
Returns the geocentric corners of the bounding box.
blX,blY,blZ | bottom left corner of box. |
trX,trY,trZ | top right corner of box. |
See | also |
TSL3DDrawingSurface | geocentricToGeodetic, geodeticToGeocentric, geocentricTo World, geodeticToWorld |
double TSL3DBoundingBox::height | ( | ) | const |
Returns the height (y-axis extent if considered as a flat lat/lon plane).
void const * TSL3DBoundingBox::ibb | ( | ) | const |
MAPLINK INTERNAL USE ONLY
void TSL3DBoundingBox::ibb | ( | void const * | ibbp | ) |
bool TSL3DBoundingBox::intersect | ( | const TSL3DBoundingBox & | bBox | ) | const |
Returns whether or not one bounding box intersects with another.
bBox | bounding box to check against |
double TSL3DBoundingBox::latMax | ( | ) | const |
Query the maximum latitude of the bounding box.
double TSL3DBoundingBox::latMin | ( | ) | const |
Query the minimum latitude of the bounding box.
double TSL3DBoundingBox::lonMax | ( | ) | const |
Query the maximum longitude of the bounding box.
double TSL3DBoundingBox::lonMin | ( | ) | const |
Query the minimum longitude of the bounding box.
bool TSL3DBoundingBox::operator!= | ( | const TSL3DBoundingBox & | rhs | ) | const |
Compares two bounding boxes.
rhs | Source for comparison. |
TSL3DBoundingBox & TSL3DBoundingBox::operator= | ( | const TSL3DBoundingBox & | anotherBoundingBox | ) |
Assignment operator.
Sets the bounding box to be equal to that specified.
anotherBoundingBox | Source for new corners. |
bool TSL3DBoundingBox::operator== | ( | const TSL3DBoundingBox & | rhs | ) | const |
Compares two bounding boxes.
rhs | Source for comparison. |
void TSL3DBoundingBox::reset | ( | const TSL3DCoord & | coord | ) |
Resets the bounding box to the specified coordinate.
Resets the bounding box so that both corners are at the specified point.
coord | Point to reset to. |
void TSL3DBoundingBox::rotate | ( | const TSL3DCoord & | rotationPoint, |
double | angle ) |
Rotates the eight points of the bounding box about the vector created from the centre of the earth in the direction of the point specified by 'rotation Point' by the angle specified by 'angle' in the anticlockwise direction. The resulting bounding box encompasses these rotated points.
rotationPoint | End point of the rotation vector |
angle | Angle in degrees to rotate in the anticlockwise direction. |
TSL3DCoord TSL3DBoundingBox::topRight | ( | ) | const |
void TSL3DBoundingBox::translate | ( | double | dLat, |
double | dLon, | ||
double | dAlt ) |
Translates the bounding box by a delta.
Translates the corners of the bounding box by the specified delta values.
dLat | latitude delta value. |
dLon | longitude delta value. |
dAlt | altitude delta value. |
double TSL3DBoundingBox::width | ( | ) | const |
Returns the width (x-axis extent if considered as a flat lat/lon plane).