14 #ifndef BOUNDINGSPHERE_H 15 #define BOUNDINGSPHERE_H 28 INLINE_MATHUTIL
explicit BoundingSphere(
const LPoint3 ¢er, PN_stdfloat radius);
34 virtual LPoint3 get_min()
const;
35 virtual LPoint3 get_max()
const;
36 virtual PN_stdfloat get_volume()
const;
38 virtual LPoint3 get_approx_center()
const;
39 virtual void xform(
const LMatrix4 &mat);
41 virtual void output(std::ostream &out)
const;
44 INLINE_MATHUTIL LPoint3 get_center()
const;
45 INLINE_MATHUTIL PN_stdfloat get_radius()
const;
47 INLINE_MATHUTIL
void set_center(
const LPoint3 ¢er);
48 INLINE_MATHUTIL
void set_radius(PN_stdfloat radius);
50 MAKE_PROPERTY(center, get_center, set_center);
51 MAKE_PROPERTY(radius, get_radius, set_radius);
64 virtual bool extend_by_point(
const LPoint3 &point);
70 virtual bool around_points(
const LPoint3 *first,
75 virtual int contains_point(
const LPoint3 &point)
const;
76 virtual int contains_lineseg(
const LPoint3 &a,
const LPoint3 &b)
const;
79 virtual int contains_box(
const BoundingBox *box)
const;
80 virtual int contains_line(
const BoundingLine *line)
const;
92 static void init_type() {
93 FiniteBoundingVolume::init_type();
95 FiniteBoundingVolume::get_class_type());
98 return get_class_type();
100 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
An axis-aligned bounding box; that is, a minimum and maximum coordinate triple.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This defines a bounding sphere, consisting of a center and a radius.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
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...