40 QgsAABB(
float xMin,
float yMin,
float zMin,
float xMax,
float yMax,
float zMax );
43 float xExtent()
const {
return xMax - xMin; }
45 float yExtent()
const {
return yMax - yMin; }
47 float zExtent()
const {
return zMax - zMin; }
50 float xCenter()
const {
return ( xMax + xMin ) / 2; }
52 float yCenter()
const {
return ( yMax + yMin ) / 2; }
54 float zCenter()
const {
return ( zMax + zMin ) / 2; }
57 QVector3D
center()
const {
return QVector3D( xCenter(), yCenter(), zCenter() ); }
59 QVector3D
minimum()
const {
return QVector3D( xMin, yMin, zMin ); }
61 QVector3D
maximum()
const {
return QVector3D( xMax, yMax, zMax ); }
64 bool intersects(
const QgsAABB &other )
const;
67 bool intersects(
float x,
float y,
float z )
const;
70 float distanceFromPoint(
float x,
float y,
float z )
const;
73 float distanceFromPoint( QVector3D v )
const;
76 QList<QVector3D> verticesForLines()
const;
79 QString toString()
const;
float yExtent() const
Returns box width in Y axis.
QVector3D center() const
Returns coordinates of the center of the box.
float xExtent() const
Returns box width in X axis.
float xCenter() const
Returns center in X axis.
float zExtent() const
Returns box width in Z axis.
QVector3D minimum() const
Returns corner of the box with minimal coordinates.
float yCenter() const
Returns center in Y axis.
QgsAABB()=default
Constructs bounding box with null coordinates.
QVector3D maximum() const
Returns corner of the box with maximal coordinates.
float zCenter() const
Returns center in Z axis.