15 #ifndef BOUNDINGSPHERE_H 16 #define BOUNDINGSPHERE_H 18 #include "pandabase.h" 20 #include "finiteBoundingVolume.h" 31 INLINE_MATHUTIL BoundingSphere(
const LPoint3 ¢er, PN_stdfloat radius);
32 ALLOC_DELETED_CHAIN(BoundingSphere);
37 virtual LPoint3 get_min()
const;
38 virtual LPoint3 get_max()
const;
39 virtual PN_stdfloat get_volume()
const;
41 virtual LPoint3 get_approx_center()
const;
42 virtual void xform(
const LMatrix4 &mat);
44 virtual void output(ostream &out)
const;
47 INLINE_MATHUTIL
LPoint3 get_center()
const;
48 INLINE_MATHUTIL PN_stdfloat get_radius()
const;
61 virtual bool extend_by_point(
const LPoint3 &point);
62 virtual bool extend_by_sphere(
const BoundingSphere *sphere);
67 virtual bool around_points(
const LPoint3 *first,
72 virtual int contains_point(
const LPoint3 &point)
const;
73 virtual int contains_lineseg(
const LPoint3 &a,
const LPoint3 &b)
const;
75 virtual int contains_sphere(
const BoundingSphere *sphere)
const;
76 virtual int contains_box(
const BoundingBox *box)
const;
77 virtual int contains_line(
const BoundingLine *line)
const;
89 static void init_type() {
90 FiniteBoundingVolume::init_type();
91 register_type(_type_handle,
"BoundingSphere",
92 FiniteBoundingVolume::get_class_type());
95 return get_class_type();
97 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
105 #include "boundingSphere.I" An axis-aligned bounding box; that is, a minimum and maximum coordinate triple.
This defines a bounding sphere, consisting of a center and a radius.
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
This funny bounding volume is an infinite plane that divides space into two regions: the part behind ...
This is an abstract class for any volume in any sense which can be said to define the locality of ref...
virtual const BoundingSphere * as_bounding_sphere() const
Virtual downcast method.
This is a 4-by-4 transform matrix.
A special kind of GeometricBoundingVolume that is known to be finite.
TypeHandle is the identifier used to differentiate C++ class types.
This defines a bounding convex hexahedron.
This funny bounding volume is an infinite line with no thickness and extending to infinity in both di...