32 INLINE_MATHUTIL
explicit BoundingBox(
const LPoint3 &min,
const LPoint3 &max);
38 virtual LPoint3 get_min()
const;
39 virtual LPoint3 get_max()
const;
40 virtual PN_stdfloat get_volume()
const;
42 virtual LPoint3 get_approx_center()
const;
43 virtual void xform(
const LMatrix4 &mat);
45 virtual void output(std::ostream &out)
const;
49 INLINE_MATHUTIL
int get_num_points()
const;
50 INLINE_MATHUTIL LPoint3 get_point(
int n)
const;
51 MAKE_SEQ(get_points, get_num_points, get_point);
52 INLINE_MATHUTIL
int get_num_planes()
const;
53 INLINE_MATHUTIL LPlane get_plane(
int n)
const;
54 MAKE_SEQ(get_planes, get_num_planes, get_plane);
56 MAKE_SEQ_PROPERTY(points, get_num_points, get_point);
57 MAKE_SEQ_PROPERTY(planes, get_num_planes, get_plane);
59 INLINE_MATHUTIL
void set_min_max(
const LPoint3 &min,
const LPoint3 &max);
63 INLINE_MATHUTIL
const LPoint3 &get_minq()
const;
64 INLINE_MATHUTIL
const LPoint3 &get_maxq()
const;
77 virtual bool extend_by_point(
const LPoint3 &point);
81 virtual bool around_points(
const LPoint3 *first,
86 virtual int contains_point(
const LPoint3 &point)
const;
87 virtual int contains_lineseg(
const LPoint3 &a,
const LPoint3 &b)
const;
89 virtual int contains_box(
const BoundingBox *box)
const;
90 virtual int contains_line(
const BoundingLine *line)
const;
98 static const int plane_def[6][3];
104 static void init_type() {
105 FiniteBoundingVolume::init_type();
107 FiniteBoundingVolume::get_class_type());
110 return get_class_type();
112 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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
virtual const BoundingBox * as_bounding_box() const
Virtual downcast method.
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...
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...