15 #include "physxBounds3.h"
16 #include "physxManager.h"
49 _bounds.getCenter(center);
62 _bounds.getDimensions(dims);
103 nassertv(!orientation.
is_nan());
104 nassertv(!translation.
is_nan());
105 nassertv(!half_dims.
is_nan());
120 _bounds.combine(b2._bounds);
131 nassertr(!p.
is_nan(),
false);
145 _bounds.fatten(distance);
169 return _bounds.intersects(b._bounds);
182 return _bounds.intersects2D(b._bounds, axis_to_ignore);
193 return _bounds.isEmpty();
204 _bounds.scale(scale);
232 nassertv(!center.
is_nan());
233 nassertv(!extents.
is_nan());
258 _bounds.setInfinite();
272 nassertv(!orientation.
is_nan());
273 nassertv(!translation.
is_nan());
void bounds_of_obb(const LMatrix3f &orientation, const LPoint3f &translation, const LVector3f &half_dims)
Sets this to the AABB (axis ligned bounding box) of the OBB (oriented bounding box).
LVector3f get_dimensions() const
Returns the extents of the bounding box.
bool is_empty() const
Returns TRUE if the bounding box is empty.
void set_center_extents(const LPoint3f ¢er, const LVector3f &extents)
Setup this AABB from center point and extents vector.
void set_max(LPoint3f value)
Sets the maximum corner of the bounding box.
void include(const LPoint3f &v)
Expands the volume to include the point v.
void set(const LPoint3f &min, const LPoint3f &max)
Setup this AABB from minimum corner and maximum corner.
bool contain(const LPoint3f &p) const
Returns TRUE if these bounds contain the point v.
bool intersects2d(const PhysxBounds3 &b, unsigned axis_to_ignore) const
Indicates whether the intersection of this and b is empty or not in the plane orthogonal to the axis ...
static NxVec3 point3_to_nxVec3(const LPoint3f &p)
Converts from LPoint3f to NxVec3.
Represention of a axis aligned bounding box.
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
void set_empty()
Sets empty to TRUE.
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
bool is_nan() const
Returns true if any component of the vector is not-a-number, false otherwise.
LPoint3f get_center() const
Returns the center of the bounding box.
bool is_nan() const
Returns true if any component of the matrix is not-a-number, false otherwise.
void set_infinite()
Sets infinite bounds.
LPoint3f get_min() const
Returns the maximum corner of the bounding box.
void scale(float scale)
Scales the AABB by the given factor.
void combine(const PhysxBounds3 &b2)
Sets this to the union of this and b2.
static NxVec3 vec3_to_nxVec3(const LVector3f &v)
Converts from LVector3f to NxVec3.
void fatten(float distance)
Fattens the AABB in all three dimensions by the given distance.
static NxMat33 mat3_to_nxMat33(const LMatrix3f &m)
Converts from LMatrix3f to NxMat33.
static LVector3f nxVec3_to_vec3(const NxVec3 &v)
Converts from NxVec3 to LVector3f.
bool intersects(const PhysxBounds3 &b) const
Returns TRUE if the intersection of this and b is is not empty.
static LPoint3f nxVec3_to_point3(const NxVec3 &p)
Converts from NxVec3 to LPoint3f.
LPoint3f get_max() const
Returns the minimum corner of the bounding box.
This is a 3-by-3 transform matrix.
void set_min(LPoint3f value)
Sets the minimum corner of the bounding box.
void transform(const LMatrix3f &orientation, const LPoint3f &translation)
Transforms this volume as if it was an axis aligned bounding box, and then assigns the results' bound...