14 #ifndef BOUNDINGHEXAHEDRON_H 15 #define BOUNDINGHEXAHEDRON_H 38 CoordinateSystem cs = CS_default);
40 const LPoint3 &fur,
const LPoint3 &ful,
41 const LPoint3 &nll,
const LPoint3 &nlr,
42 const LPoint3 &nur,
const LPoint3 &nul);
48 virtual LPoint3 get_min()
const;
49 virtual LPoint3 get_max()
const;
51 virtual LPoint3 get_approx_center()
const;
52 virtual void xform(
const LMatrix4 &mat);
54 virtual void output(std::ostream &out)
const;
55 virtual void write(std::ostream &out,
int indent_level = 0)
const;
58 INLINE_MATHUTIL
int get_num_points()
const;
59 INLINE_MATHUTIL LPoint3 get_point(
int n)
const;
60 MAKE_SEQ(get_points, get_num_points, get_point);
61 INLINE_MATHUTIL
int get_num_planes()
const;
62 INLINE_MATHUTIL LPlane get_plane(
int n)
const;
63 MAKE_SEQ(get_planes, get_num_planes, get_plane);
65 MAKE_SEQ_PROPERTY(points, get_num_points, get_point);
66 MAKE_SEQ_PROPERTY(planes, get_num_planes, get_plane);
78 virtual int contains_point(
const LPoint3 &point)
const;
79 virtual int contains_lineseg(
const LPoint3 &a,
const LPoint3 &b)
const;
81 virtual int contains_box(
const BoundingBox *box)
const;
94 LPoint3 _points[num_points];
95 LPlane _planes[num_planes];
103 static void init_type() {
104 FiniteBoundingVolume::init_type();
106 FiniteBoundingVolume::get_class_type());
109 return get_class_type();
111 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.
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 BoundingHexahedron * as_bounding_hexahedron() const
Virtual downcast method.
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...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A special kind of GeometricBoundingVolume that is known to be finite.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle is the identifier used to differentiate C++ class types.
This defines a bounding convex hexahedron.