32 INLINE_MATHUTIL
explicit BoundingBox(
const LPoint3 &min,
const LPoint3 &max);
36 virtual BoundingVolume *make_copy()
const;
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;
50 INLINE_MATHUTIL LPoint3
get_point(
int n)
const;
53 INLINE_MATHUTIL LPlane
get_plane(
int n)
const;
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;
70 virtual bool extend_other(BoundingVolume *other)
const;
71 virtual bool around_other(BoundingVolume *other,
72 const BoundingVolume **first,
73 const BoundingVolume **last)
const;
74 virtual int contains_other(
const BoundingVolume *other)
const;
77 virtual bool extend_by_point(
const LPoint3 &point);
81 virtual bool around_points(
const LPoint3 *first,
83 virtual bool around_finite(
const BoundingVolume **first,
84 const BoundingVolume **last);
86 virtual int contains_point(
const LPoint3 &point)
const;
87 virtual int contains_lineseg(
const LPoint3 &a,
const LPoint3 &b)
const;
88 virtual int contains_hexahedron(
const BoundingHexahedron *hexahedron)
const;
89 virtual int contains_box(
const BoundingBox *box)
const;
90 virtual int contains_line(
const BoundingLine *line)
const;
91 virtual int contains_plane(
const BoundingPlane *plane)
const;
98 static const int plane_def[6][3];
104 static void init_type() {
105 FiniteBoundingVolume::init_type();
107 FiniteBoundingVolume::get_class_type());
109 virtual TypeHandle get_type()
const {
110 return get_class_type();
112 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
115 static TypeHandle _type_handle;
117 friend class BoundingSphere;
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void set_min_max(const LPoint3 &min, const LPoint3 &max)
Sets the min and max point of the rectangular solid.
const LPoint3 & get_minq() const
An inline accessor for the minimum value.
get_plane
Returns the nth face of the rectangular solid.
get_num_points
Returns 8: the number of vertices of a rectangular solid.
BoundingBox()
Constructs an empty box object.
get_point
Returns the nth vertex of the rectangular solid.
get_num_planes
Returns 6: the number of faces of a rectangular solid.
const LPoint3 & get_maxq() const
An inline accessor for the maximum value.
virtual const BoundingBox * as_bounding_box() 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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...