17 #ifndef AGXCOLLIDE_BOUNDINGAABB_H 18 #define AGXCOLLIDE_BOUNDINGAABB_H 133 bool isCleared()
const;
160 this->
expand(other, transform);
167 this->
expand(other, transform);
180 return min()[0] >
max()[0];
218 pos[0] > (
min()[0] - radius) && pos[1] > (
min()[1] - radius) && pos[2] > (
min()[2] - radius) &&
219 pos[0] < (
max()[0] + radius) && pos[1] < (
max()[1] + radius) && pos[2] < (
max()[2] + radius);
226 output <<
"min(): " << bound.
min() <<
", max(): " << bound.
max();
Vec3T< T > min(const Vec3T< T > &lhs, const Vec3T< T > &rhs)
Vec3T< T > max(const Vec3T< T > &lhs, const Vec3T< T > &rhs)
This namespace consists of a set of classes for handling geometric intersection tests including boole...
#define AGX_TYPE_BINDING(_Type, _Name)
void AGXCORE_EXPORT transform(void *target, const Format *targetFormat, const void *source, const Format *sourceFormat, size_t numElements)
Transform data between two buffers.
#define AGXPHYSICS_EXPORT
void reset()
Removes any extent of the bound.
void set(const Vec3 &min, const Vec3 &max)
Relocate the bound to the new location.
bool isCleared() const
Is the bounding volume cleared? Will be true e.g.
BoundingAABB()
Creates an empty bounding volume. isCleared() will return 'true'.
bool hasOverlap(const BoundT &other) const
std::ostream & operator<<(std::ostream &output, const BoundingAABB &bound)
void expand(const agx::Bound3 &other)
Expands a bounding volume to contain both itself and another bound.
void set(const agx::Bound3 &other, const agx::AffineMatrix4x4 &transform)
Sets a bounding volume given a bounding volume given in another coordinate-system.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
bool hasOverlap(const BoundingAABB *other) const
Tests if the bound intersects with another bounding volume.
static Vec3T componentMax(const Vec3T &v1, const Vec3T &v2)
Creates a new vector where each component is the maximum of this and the other vector.
AGXCORE_EXPORT const Real RealMax
Axis aligned bounding box implementation.
bool testSphereOverlap(const agx::Vec3 &pos, agx::Real radius) const
Test if a sphere overlaps the bound.
static Vec3T componentMin(const Vec3T &v1, const Vec3T &v2)
Creates a new vector where each component is the minimum of this and the other vector.