![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
Class representing 3D range or axis aligned bounding box. More...
#include <qssgbounds3_p.h>
Public Member Functions | |
| Q_DECL_CONSTEXPR Q_ALWAYS_INLINE | QSSGBounds3 () |
| Default constructor, using empty bounds. | |
| Q_ALWAYS_INLINE | QSSGBounds3 (Qt::Initialization) |
| Construct uninitialized. | |
| Q_DECL_CONSTEXPR Q_ALWAYS_INLINE | QSSGBounds3 (const QVector3D &minimum, const QVector3D &maximum) |
| Construct from two bounding points. | |
| Q_DECL_CONSTEXPR Q_ALWAYS_INLINE | QSSGBounds3 (const QSSGBoxPoints &points) |
| Construct from QSSGBoxPoints. | |
| Q_ALWAYS_INLINE void | setEmpty () |
| Sets empty to true. | |
| Q_ALWAYS_INLINE void | setInfinite () |
| Sets infinite bounds. | |
| void | include (const QVector3D &v) |
| expands the volume to include v | |
| void | include (const QSSGBounds3 &b) |
| expands the volume to include b. | |
| Q_ALWAYS_INLINE bool | isEmpty () const |
| Q_ALWAYS_INLINE bool | intersects (const QSSGBounds3 &b) const |
| indicates whether the intersection of this and b is empty or not. | |
| Q_ALWAYS_INLINE bool | intersects1D (const QSSGBounds3 &a, quint32 axis) const |
| computes the 1D-intersection between two AABBs, on a given axis. | |
| Q_ALWAYS_INLINE bool | contains (const QVector3D &v) const |
| indicates if these bounds contain v. | |
| Q_ALWAYS_INLINE bool | isInside (const QSSGBounds3 &box) const |
| checks a box is inside another box. | |
| Q_ALWAYS_INLINE QVector3D | center () const |
| returns the center of this axis aligned box. | |
| Q_ALWAYS_INLINE float | center (quint32 axis) const |
| get component of the box's center along a given axis | |
| Q_ALWAYS_INLINE float | extents (quint32 axis) const |
| get component of the box's extents along a given axis | |
| Q_ALWAYS_INLINE QVector3D | dimensions () const |
| returns the dimensions (width/height/depth) of this axis aligned box. | |
| Q_ALWAYS_INLINE QVector3D | extents () const |
| returns the extents, which are half of the width/height/depth. | |
| Q_ALWAYS_INLINE void | scale (float scale) |
| scales the AABB. | |
| Q_ALWAYS_INLINE void | fatten (double distance) |
| bool | isFinite () const |
| Q_ALWAYS_INLINE QSSGBoxPoints | toQSSGBoxPointsNoEmptyCheck () const |
| Q_ALWAYS_INLINE QSSGBoxPoints | toQSSGBoxPoints () const |
| void | transform (const QMatrix4x4 &inMatrix) |
| QVector3D | getSupport (const QVector3D &direction) const |
Static Public Member Functions | |
| static Q_ALWAYS_INLINE QSSGBounds3 | boundsOfPoints (const QVector3D &v0, const QVector3D &v1) |
| returns the AABB containing v0 and v1. | |
| static Q_ALWAYS_INLINE QSSGBounds3 | centerExtents (const QVector3D ¢er, const QVector3D &extent) |
| returns the AABB from center and extents vectors. | |
| static Q_ALWAYS_INLINE QSSGBounds3 | basisExtent (const QVector3D ¢er, const QMatrix3x3 &basis, const QVector3D &extent) |
| Construct from center, extent, and (not necessarily orthogonal) basis. | |
| static QSSGBounds3 | transform (const QMatrix3x3 &matrix, const QSSGBounds3 &bounds) |
| gets the transformed bounds of the passed AABB (resulting in a bigger AABB). | |
Public Attributes | |
| QVector3D | minimum |
| QVector3D | maximum |
Class representing 3D range or axis aligned bounding box.
Stored as minimum and maximum extent corners. Alternate representation would be center and dimensions. May be empty or nonempty. If not empty, minimum <= maximum has to hold.
Definition at line 42 of file qssgbounds3_p.h.
| Q_DECL_CONSTEXPR Q_ALWAYS_INLINE QSSGBounds3::QSSGBounds3 | ( | ) |
Default constructor, using empty bounds.
Definition at line 202 of file qssgbounds3_p.h.
| Q_ALWAYS_INLINE QSSGBounds3::QSSGBounds3 | ( | Qt::Initialization | ) |
Construct uninitialized.
Definition at line 208 of file qssgbounds3_p.h.
| Q_DECL_CONSTEXPR Q_ALWAYS_INLINE QSSGBounds3::QSSGBounds3 | ( | const QVector3D & | minimum, |
| const QVector3D & | maximum ) |
Construct from two bounding points.
Definition at line 211 of file qssgbounds3_p.h.
| Q_DECL_CONSTEXPR Q_ALWAYS_INLINE QSSGBounds3::QSSGBounds3 | ( | const QSSGBoxPoints & | points | ) |
Construct from QSSGBoxPoints.
Definition at line 216 of file qssgbounds3_p.h.
|
static |
Construct from center, extent, and (not necessarily orthogonal) basis.
Definition at line 34 of file qssgbounds3.cpp.
|
static |
returns the AABB containing v0 and v1.
Definition at line 29 of file qssgbounds3.cpp.
| Q_ALWAYS_INLINE QVector3D QSSGBounds3::center | ( | ) | const |
returns the center of this axis aligned box.
Definition at line 289 of file qssgbounds3_p.h.
| Q_ALWAYS_INLINE float QSSGBounds3::center | ( | quint32 | axis | ) | const |
get component of the box's center along a given axis
Definition at line 295 of file qssgbounds3_p.h.
|
static |
returns the AABB from center and extents vectors.
| center | Center vector |
| extent | Extents vector |
Definition at line 224 of file qssgbounds3_p.h.
| Q_ALWAYS_INLINE bool QSSGBounds3::contains | ( | const QVector3D & | v | ) | const |
indicates if these bounds contain v.
Definition at line 263 of file qssgbounds3_p.h.
| Q_ALWAYS_INLINE QVector3D QSSGBounds3::dimensions | ( | ) | const |
returns the dimensions (width/height/depth) of this axis aligned box.
Definition at line 307 of file qssgbounds3_p.h.
| Q_ALWAYS_INLINE QVector3D QSSGBounds3::extents | ( | ) | const |
returns the extents, which are half of the width/height/depth.
Definition at line 313 of file qssgbounds3_p.h.
| Q_ALWAYS_INLINE float QSSGBounds3::extents | ( | quint32 | axis | ) | const |
get component of the box's extents along a given axis
Definition at line 301 of file qssgbounds3_p.h.
| Q_ALWAYS_INLINE void QSSGBounds3::fatten | ( | double | distance | ) |
fattens the AABB in all 3 dimensions by the given distance.
Definition at line 325 of file qssgbounds3_p.h.
Returns the support point in a given direction
Definition at line 68 of file qssgbounds3.cpp.
| void QSSGBounds3::include | ( | const QSSGBounds3 & | b | ) |
expands the volume to include b.
| b | Bounds to perform union with. |
Definition at line 18 of file qssgbounds3.cpp.
| QT_BEGIN_NAMESPACE void QSSGBounds3::include | ( | const QVector3D & | v | ) |
expands the volume to include v
Definition at line 12 of file qssgbounds3.cpp.
| Q_ALWAYS_INLINE bool QSSGBounds3::intersects | ( | const QSSGBounds3 & | b | ) | const |
indicates whether the intersection of this and b is empty or not.
| b | Bounds to test for intersection. |
Definition at line 250 of file qssgbounds3_p.h.
| Q_ALWAYS_INLINE bool QSSGBounds3::intersects1D | ( | const QSSGBounds3 & | a, |
| quint32 | axis ) const |
computes the 1D-intersection between two AABBs, on a given axis.
| a | the other AABB |
| axis | the axis (0, 1, 2) |
Definition at line 257 of file qssgbounds3_p.h.
| Q_ALWAYS_INLINE bool QSSGBounds3::isEmpty | ( | ) | const |
Definition at line 243 of file qssgbounds3_p.h.
| bool QSSGBounds3::isFinite | ( | ) | const |
checks that the AABB values are not NaN
Definition at line 24 of file qssgbounds3.cpp.
| Q_ALWAYS_INLINE bool QSSGBounds3::isInside | ( | const QSSGBounds3 & | box | ) | const |
checks a box is inside another box.
| box | the other AABB |
Definition at line 271 of file qssgbounds3_p.h.
| Q_ALWAYS_INLINE void QSSGBounds3::scale | ( | float | scale | ) |
scales the AABB.
| scale | Factor to scale AABB by. |
Definition at line 319 of file qssgbounds3_p.h.
| Q_ALWAYS_INLINE void QSSGBounds3::setEmpty | ( | ) |
Sets empty to true.
Definition at line 229 of file qssgbounds3_p.h.
| Q_ALWAYS_INLINE void QSSGBounds3::setInfinite | ( | ) |
Sets infinite bounds.
Definition at line 236 of file qssgbounds3_p.h.
| Q_ALWAYS_INLINE QSSGBoxPoints QSSGBounds3::toQSSGBoxPoints | ( | ) | const |
Verifies that the bounds is non-empty.
Definition at line 347 of file qssgbounds3_p.h.
| Q_ALWAYS_INLINE QSSGBoxPoints QSSGBounds3::toQSSGBoxPointsNoEmptyCheck | ( | ) | const |
Use when the bounds is already verified to be non-empty!!!
Definition at line 332 of file qssgbounds3_p.h.
|
static |
gets the transformed bounds of the passed AABB (resulting in a bigger AABB).
| [in] | matrix | Transform to apply, can contain scaling as well |
| [in] | bounds | The bounds to transform. |
Definition at line 51 of file qssgbounds3.cpp.
| void QSSGBounds3::transform | ( | const QMatrix4x4 & | inMatrix | ) |
Definition at line 58 of file qssgbounds3.cpp.
| QVector3D QSSGBounds3::maximum |
Definition at line 199 of file qssgbounds3_p.h.
| QVector3D QSSGBounds3::minimum |
Definition at line 198 of file qssgbounds3_p.h.