42 _bounds.getCenter(center);
53 _bounds.getDimensions(dims);
63 nassertv(!value.is_nan());
74 nassertv(!value.is_nan());
85 bounds_of_obb(
const LMatrix3f &orientation,
const LPoint3f &translation,
const LVector3f &half_dims) {
87 nassertv(!orientation.is_nan());
88 nassertv(!translation.is_nan());
89 nassertv(!half_dims.is_nan());
102 _bounds.combine(b2._bounds);
111 nassertr(!p.is_nan(),
false);
122 _bounds.fatten(distance);
131 nassertv(!p.is_nan());
141 return _bounds.intersects(b._bounds);
151 return _bounds.intersects2D(b._bounds, axis_to_ignore);
160 return _bounds.isEmpty();
169 _bounds.scale(
scale);
176 set(
const LPoint3f &min,
const LPoint3f &max) {
178 nassertv(!min.is_nan());
179 nassertv(!max.is_nan());
191 nassertv(!center.is_nan());
192 nassertv(!extents.is_nan());
213 _bounds.setInfinite();
222 transform(
const LMatrix3f &orientation,
const LPoint3f &translation) {
224 nassertv(!orientation.is_nan());
225 nassertv(!translation.is_nan());
bool is_empty() const
Returns TRUE if the bounding box is empty.
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).
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 intersects(const PhysxBounds3 &b) const
Returns TRUE if the intersection of this and b is is not empty.
bool contain(const LPoint3f &p) const
Returns TRUE if these bounds contain the point v.
static NxVec3 point3_to_nxVec3(const LPoint3f &p)
Converts from LPoint3f to NxVec3.
Represention of a axis aligned bounding box.
void set_empty()
Sets empty to TRUE.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
LPoint3f get_center() const
Returns the center of the bounding box.
void set_infinite()
Sets infinite bounds.
LPoint3f get_max() const
Returns the minimum 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 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 ...
LVector3f get_dimensions() const
Returns the extents of the bounding box.
static LPoint3f nxVec3_to_point3(const NxVec3 &p)
Converts from NxVec3 to LPoint3f.
LPoint3f get_min() const
Returns the maximum corner of the bounding box.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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...