18 #include "pandabase.h"
20 #include "finiteBoundingVolume.h"
34 INLINE_MATHUTIL BoundingBox(
const LPoint3 &min,
const LPoint3 &max);
35 ALLOC_DELETED_CHAIN(BoundingBox);
40 virtual LPoint3 get_min()
const;
41 virtual LPoint3 get_max()
const;
42 virtual PN_stdfloat get_volume()
const;
44 virtual LPoint3 get_approx_center()
const;
45 virtual void xform(
const LMatrix4 &mat);
47 virtual void output(ostream &out)
const;
50 INLINE_MATHUTIL
int get_num_points()
const;
51 INLINE_MATHUTIL
LPoint3 get_point(
int n)
const;
52 MAKE_SEQ(get_points, get_num_points, get_point);
53 INLINE_MATHUTIL
int get_num_planes()
const;
54 INLINE_MATHUTIL LPlane get_plane(
int n)
const;
55 MAKE_SEQ(get_planes, get_num_planes, get_plane);
59 INLINE_MATHUTIL
const LPoint3 &get_minq()
const;
60 INLINE_MATHUTIL
const LPoint3 &get_maxq()
const;
73 virtual bool extend_by_point(
const LPoint3 &point);
74 virtual bool extend_by_box(
const BoundingBox *box);
77 virtual bool around_points(
const LPoint3 *first,
82 virtual int contains_point(
const LPoint3 &point)
const;
83 virtual int contains_lineseg(
const LPoint3 &a,
const LPoint3 &b)
const;
85 virtual int contains_box(
const BoundingBox *box)
const;
86 virtual int contains_line(
const BoundingLine *line)
const;
94 static const int plane_def[6][3];
100 static void init_type() {
101 FiniteBoundingVolume::init_type();
102 register_type(_type_handle,
"BoundingBox",
103 FiniteBoundingVolume::get_class_type());
106 return get_class_type();
108 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
116 #include "boundingBox.I"
An axis-aligned bounding box; that is, a minimum and maximum coordinate triple.
virtual const BoundingBox * as_bounding_box() const
Virtual downcast method.
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...
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...