|
AGX Dynamics 2.41.1.2
|
Axis aligned bounding box implementation. More...
#include <BoundingAABB.h>
Inheritance diagram for agxCollide::BoundingAABB:Public Member Functions | |
| BoundingAABB () | |
| Creates an empty bounding volume. isCleared() will return 'true'. | |
| BoundingAABB (const agx::Bound3 &other, const agx::AffineMatrix4x4 &transform) | |
| Creates a bounding volume given a bounding volume given in another coordinate-system. | |
| BoundingAABB (const agx::Vec3 &min, const agx::Vec3 &max) | |
| Creates a bounding volume given a component-wise minimum and maximum point. | |
| void | expand (const agx::Bound3 &other) |
| Expands a bounding volume to contain both itself and another bound. | |
| void | expand (const agx::Bound3 &other, const agx::AffineMatrix4x4 &transform) |
| Expands a bounding volume given a bounding volume given in another coordinate-system. | |
| void | expand (const agx::Vec3 &otherMin, const agx::Vec3 &otherMax) |
| Expands a bounding volume to contain both itself and another bound. | |
| void | expand (const agx::Vec3 &otherMin, const agx::Vec3 &otherMax, const agx::AffineMatrix4x4 &transform) |
| Expands a bounding volume given a bounding volume given in another coordinate-system. | |
| void | expand (const agx::Vec3 &point) |
| Expands a bounding volume to contain both itself and another point. | |
| bool | hasOverlap (const BoundingAABB *other) const |
| Tests if the bound intersects with another bounding volume. | |
| bool | isCleared () const |
| Is the bounding volume cleared? Will be true e.g. | |
| void | reset () |
| Removes any extent of the bound. | |
| void | set (const agx::Bound3 &other, const agx::AffineMatrix4x4 &transform) |
| Sets a bounding volume given a bounding volume given in another coordinate-system. | |
| bool | testSphereOverlap (const agx::Vec3 &pos, agx::Real radius) const |
| Test if a sphere overlaps the bound. | |
Public Member Functions inherited from agx::BoundT< Vec3 > | |
| BoundT () | |
| Create a bound initialized to the empty range located at the type's default value. | |
| BoundT (const BoundT &other) | |
| BoundT (const Vec3 &min, const Vec3 &max) | |
| BoundT | calculateOverlap (const BoundT &other) const |
| bool | contains (const Vec3 &value) const |
| bool | hasOverlap (const BoundT &other) const |
| bool | isValid () const |
| Vec3 & | max () |
| const Vec3 & | max () const |
| Vec3 | mid () const |
| Vec3 & | min () |
| const Vec3 & | min () const |
| operator BoundT< T2 > () const | |
| Convert the bound to a bound with a different underlying type. | |
| bool | operator!= (const BoundT &other) const |
| BoundT | operator* (T2 scale) |
| Create a new bound that has the same midpoint as the current bound, but with a size that is scaled according to the given scale. | |
| BoundT< Vec3 > | operator* (T2 scale) |
| BoundT & | operator*= (T2 scale) |
| Scale the bound so that is size is changed according to the given scale, but the midpoint remains unchanged. | |
| BoundT< Vec3 > & | operator*= (T2 scale) |
| BoundT & | operator= (const BoundT &other) |
| bool | operator== (const BoundT &other) const |
| void | set (const Vec3 &min, const Vec3 &max) |
| Relocate the bound to the new location. | |
| Vec3 | size () const |
| BoundT | translate (const Vec3 &offset) const |
| Move the bound's midpoint without altering its size. | |
Additional Inherited Members | |
Public Types inherited from agx::BoundT< Vec3 > | |
| typedef Vec3 | Type |
Protected Attributes inherited from agx::BoundT< Vec3 > | |
| Vec3 | m_max |
| Vec3 | m_min |
Axis aligned bounding box implementation.
Definition at line 37 of file BoundingAABB.h.
| agxCollide::BoundingAABB::BoundingAABB | ( | ) |
Creates an empty bounding volume. isCleared() will return 'true'.
Definition at line 146 of file BoundingAABB.h.
References reset().
Creates a bounding volume given a component-wise minimum and maximum point.
| min | The component-wise minimum. |
| max | The component-wise maximum. If min is not the component-wise minimum and max is not the component-wise maximum, unexpected results might occur. |
Definition at line 152 of file BoundingAABB.h.
| agxCollide::BoundingAABB::BoundingAABB | ( | const agx::Bound3 & | other, |
| const agx::AffineMatrix4x4 & | transform | ||
| ) |
Creates a bounding volume given a bounding volume given in another coordinate-system.
| other | The bounding volume, given in another coordinate system. |
| transform | The transformation matrix from the coordinate system where 'other' is defined to the desired one. |
Definition at line 157 of file BoundingAABB.h.
| void agxCollide::BoundingAABB::expand | ( | const agx::Bound3 & | other | ) |
Expands a bounding volume to contain both itself and another bound.
If isCleared() was true before, the bound will be set to the other one.
Definition at line 184 of file BoundingAABB.h.
References expand(), agx::BoundT< T >::max(), and agx::BoundT< T >::min().
Referenced by BoundingAABB(), expand(), and set().
| void agxCollide::BoundingAABB::expand | ( | const agx::Bound3 & | other, |
| const agx::AffineMatrix4x4 & | transform | ||
| ) |
Expands a bounding volume given a bounding volume given in another coordinate-system.
If isCleared() was true before, the bound will be set to the point.
| other | The bounding volume, given in another coordinate system. |
| transform | The transformation matrix from the coordinate system where 'other' is defined to the desired one. |
Definition at line 203 of file BoundingAABB.h.
References expand(), agx::BoundT< T >::max(), and agx::BoundT< T >::min().
Expands a bounding volume to contain both itself and another bound.
If isCleared() was true before, the bound will be set the other one.
| otherMin | The component-wise minimum. |
| otherMax | The component-wise maximum. If min is not the component-wise minimum and max is not the component-wise maximum, unexpected results might occur. |
Definition at line 196 of file BoundingAABB.h.
References agx::Vec3T< Real >::componentMax(), agx::Vec3T< Real >::componentMin(), agx::BoundT< Vec3 >::max(), and agx::BoundT< Vec3 >::min().
| void agxCollide::BoundingAABB::expand | ( | const agx::Vec3 & | otherMin, |
| const agx::Vec3 & | otherMax, | ||
| const agx::AffineMatrix4x4 & | transform | ||
| ) |
Expands a bounding volume given a bounding volume given in another coordinate-system.
If isCleared() was true before, the bound will be set to the point.
| otherMin | The component-wise minimum, given in another coordinate system. |
| otherMax | The component-wise maximum, given in another coordinate system. |
| transform | The transformation matrix from the coordinate system where 'otherMin' and 'otherMax' are defined to the desired one. |
| void agxCollide::BoundingAABB::expand | ( | const agx::Vec3 & | point | ) |
Expands a bounding volume to contain both itself and another point.
If isCleared() was true before, the bound will be set to the point.
Definition at line 190 of file BoundingAABB.h.
References expand().
| bool agxCollide::BoundingAABB::hasOverlap | ( | const BoundingAABB * | other | ) | const |
Tests if the bound intersects with another bounding volume.
| other | The other bounding volume, to be given in same coordinate system. |
| Do | the bounding volumes overlap? |
Definition at line 209 of file BoundingAABB.h.
References agx::BoundT< Vec3 >::hasOverlap().
| bool agxCollide::BoundingAABB::isCleared | ( | ) | const |
Is the bounding volume cleared? Will be true e.g.
after call to reset().
Definition at line 178 of file BoundingAABB.h.
References agx::BoundT< Vec3 >::max(), and agx::BoundT< Vec3 >::min().
| void agxCollide::BoundingAABB::reset | ( | ) |
Removes any extent of the bound.
isCleared() will return 'true'.
Definition at line 171 of file BoundingAABB.h.
References agx::BoundT< Vec3 >::max(), agx::BoundT< Vec3 >::min(), agx::RealMax, and agx::Vec3T< T >::set().
Referenced by BoundingAABB(), and set().
| void agxCollide::BoundingAABB::set | ( | const agx::Bound3 & | other, |
| const agx::AffineMatrix4x4 & | transform | ||
| ) |
Sets a bounding volume given a bounding volume given in another coordinate-system.
| other | The bounding volume, given in another coordinate system. |
| transform | The transformation matrix from the coordinate system where 'other' is defined to the desired one. |
Definition at line 164 of file BoundingAABB.h.
Test if a sphere overlaps the bound.
May give false positives outside the bound's edges or corners.
| pos | The position of the sphere. |
| radius | The radius of the sphere |
| Do | the sphere and the bound overlap? May give false positives outside the bound's edges or corners. |
Definition at line 215 of file BoundingAABB.h.
References agx::BoundT< Vec3 >::max(), and agx::BoundT< Vec3 >::min().