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();
#define AGX_TYPE_BINDING(_Type, _Name)
#define AGXPHYSICS_EXPORT
Axis aligned bounding box implementation.
void expand(const agx::Bound3 &other)
Expands a bounding volume to contain both itself and another bound.
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.
BoundingAABB()
Creates an empty bounding volume. isCleared() will return 'true'.
bool testSphereOverlap(const agx::Vec3 &pos, agx::Real radius) const
Test if a sphere overlaps the bound.
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 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.
bool hasOverlap(const BoundT &other) const
void set(const Vec3 &min, const Vec3 &max)
Relocate the bound to the new location.
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.
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.
This namespace consists of a set of classes for handling geometric intersection tests including boole...
std::ostream & operator<<(std::ostream &output, const BoundingAABB &bound)
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
AGXCORE_EXPORT const Real RealMax