37 QgsAABB(
float xMin,
float yMin,
float zMin,
float xMax,
float yMax,
float zMax );
40 float xExtent()
const {
return xMax - xMin; }
42 float yExtent()
const {
return yMax - yMin; }
44 float zExtent()
const {
return zMax - zMin; }
47 float xCenter()
const {
return ( xMax + xMin ) / 2; }
49 float yCenter()
const {
return ( yMax + yMin ) / 2; }
51 float zCenter()
const {
return ( zMax + zMin ) / 2; }
54 QVector3D
center()
const {
return QVector3D( xCenter(), yCenter(), zCenter() ); }
56 QVector3D
minimum()
const {
return QVector3D( xMin, yMin, zMin ); }
58 QVector3D
maximum()
const {
return QVector3D( xMax, yMax, zMax ); }
61 bool intersects(
const QgsAABB &other )
const;
64 bool intersects(
float x,
float y,
float z )
const;
67 float distanceFromPoint(
float x,
float y,
float z )
const;
70 float distanceFromPoint(
const QVector3D &v )
const;
73 QList<QVector3D> verticesForLines()
const;
3 Axis-aligned bounding box - in world coords.
float xCenter() const
Returns center in X axis.
QVector3D center() const
Returns coordinates of the center of the box.
QVector3D maximum() const
Returns corner of the box with maximal coordinates.
float xExtent() const
Returns box width in X axis.
float yExtent() const
Returns box width in Y axis.
QVector3D minimum() const
Returns corner of the box with minimal coordinates.
float zCenter() const
Returns center in Z axis.
float zExtent() const
Returns box width in Z axis.
float yCenter() const
Returns center in Y axis.