MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSL3DBoundingBox Class Reference

Detailed Description

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

Deprecated
Deprecated as of MapLink 11.1. Advised to use MapLink Earth SDK instead.

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
 
TSL3DBoundingBoxoperator= (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)
 

Constructor & Destructor Documentation

◆ TSL3DBoundingBox() [1/5]

TSL3DBoundingBox::TSL3DBoundingBox ( )

◆ TSL3DBoundingBox() [2/5]

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.

Parameters
bottomLeftTSL3DCoord containing the bottom left corner of the extent.
topRightTSL3DCoord containing the top right corner of the extent.

◆ TSL3DBoundingBox() [3/5]

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.

Parameters
(lat1,lon1,alt1)Corner of the extent.
(lat2,lon2,alt2)Opposite corner of the extent.

◆ TSL3DBoundingBox() [4/5]

TSL3DBoundingBox::TSL3DBoundingBox ( const TSL3DBoundingBox & rhs)

Copy constructor

◆ ~TSL3DBoundingBox()

TSL3DBoundingBox::~TSL3DBoundingBox ( )

◆ TSL3DBoundingBox() [5/5]

TSL3DBoundingBox::TSL3DBoundingBox ( const void * ibbp)

Member Function Documentation

◆ altMax()

double TSL3DBoundingBox::altMax ( ) const

Query the maximum altitude value of the bounding box.

◆ altMin()

double TSL3DBoundingBox::altMin ( ) const

Query the minimum altitude of the bounding box.

◆ bottomLeft()

TSL3DCoord TSL3DBoundingBox::bottomLeft ( ) const

◆ centre()

TSL3DCoord TSL3DBoundingBox::centre ( ) const

Returns the center of the bounding box.

◆ corners() [1/2]

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.

Parameters
bottomLeftTSL3DCoord containing the bottom left corner of the extent.
topRightTSL3DCoord containing the top right corner of the extent.

◆ corners() [2/2]

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.

Parameters
(lat1,lon1,alt1)Corner of the extent.
(lat2,lon2,alt2)Opposite corner of the extent.

◆ depth()

double TSL3DBoundingBox::depth ( ) const

Returns the depth (altitude).

◆ expandToInclude() [1/2]

void TSL3DBoundingBox::expandToInclude ( const TSL3DBoundingBox & includeBBox)

Expand a bounding box to include the specified bounding box

Parameters
includeBBoxthe bounding box which should be contained by this bounding box.

◆ expandToInclude() [2/2]

void TSL3DBoundingBox::expandToInclude ( const TSL3DCoord & coord)

Expand a bounding box to include the specified point

Parameters
coordthe point which should be contained by this bounding box.

◆ getGeocentricCorners()

void TSL3DBoundingBox::getGeocentricCorners ( double & blX,
double & blY,
double & blZ,
double & trX,
double & trY,
double & trZ ) const

Returns the geocentric corners of the bounding box.

Parameters
blX,blY,blZbottom left corner of box.
trX,trY,trZtop right corner of box.
Seealso
TSL3DDrawingSurfacegeocentricToGeodetic, geodeticToGeocentric, geocentricTo World, geodeticToWorld

◆ height()

double TSL3DBoundingBox::height ( ) const

Returns the height (y-axis extent if considered as a flat lat/lon plane).

◆ ibb() [1/2]

void const * TSL3DBoundingBox::ibb ( ) const

MAPLINK INTERNAL USE ONLY

◆ ibb() [2/2]

void TSL3DBoundingBox::ibb ( void const * ibbp)

◆ intersect()

bool TSL3DBoundingBox::intersect ( const TSL3DBoundingBox & bBox) const

Returns whether or not one bounding box intersects with another.

Parameters
bBoxbounding box to check against

◆ latMax()

double TSL3DBoundingBox::latMax ( ) const

Query the maximum latitude of the bounding box.

◆ latMin()

double TSL3DBoundingBox::latMin ( ) const

Query the minimum latitude of the bounding box.

◆ lonMax()

double TSL3DBoundingBox::lonMax ( ) const

Query the maximum longitude of the bounding box.

◆ lonMin()

double TSL3DBoundingBox::lonMin ( ) const

Query the minimum longitude of the bounding box.

◆ operator!=()

bool TSL3DBoundingBox::operator!= ( const TSL3DBoundingBox & rhs) const

Compares two bounding boxes.

Parameters
rhsSource for comparison.
Returns
true if the corners of this bounding box are different from that of the rhs bounding box, false otherwise.

◆ operator=()

TSL3DBoundingBox & TSL3DBoundingBox::operator= ( const TSL3DBoundingBox & anotherBoundingBox)

Assignment operator.

Sets the bounding box to be equal to that specified.

Parameters
anotherBoundingBoxSource for new corners.
Returns
reference to newly updated value.

◆ operator==()

bool TSL3DBoundingBox::operator== ( const TSL3DBoundingBox & rhs) const

Compares two bounding boxes.

Parameters
rhsSource for comparison.
Returns
true if the corners of this bounding box are the same as that of the rhs bounding box, false otherwise.

◆ reset()

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.

Parameters
coordPoint to reset to.

◆ rotate()

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.

Parameters
rotationPointEnd point of the rotation vector
angleAngle in degrees to rotate in the anticlockwise direction.

◆ topRight()

TSL3DCoord TSL3DBoundingBox::topRight ( ) const

◆ translate()

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.

Parameters
dLatlatitude delta value.
dLonlongitude delta value.
dAltaltitude delta value.

◆ width()

double TSL3DBoundingBox::width ( ) const

Returns the width (x-axis extent if considered as a flat lat/lon plane).