15 #ifndef BOUNDINGHEXAHEDRON_H
16 #define BOUNDINGHEXAHEDRON_H
18 #include "pandabase.h"
20 #include "finiteBoundingVolume.h"
24 #include "coordinateSystem.h"
41 BoundingHexahedron(
const LFrustum &frustum,
bool is_ortho,
42 CoordinateSystem cs = CS_default);
49 ALLOC_DELETED_CHAIN(BoundingHexahedron);
52 virtual LPoint3 get_min()
const;
53 virtual LPoint3 get_max()
const;
55 virtual LPoint3 get_approx_center()
const;
56 virtual void xform(
const LMatrix4 &mat);
58 virtual void output(ostream &out)
const;
59 virtual void write(ostream &out,
int indent_level = 0)
const;
62 INLINE_MATHUTIL
int get_num_points()
const;
63 INLINE_MATHUTIL
LPoint3 get_point(
int n)
const;
64 MAKE_SEQ(get_points, get_num_points, get_point);
65 INLINE_MATHUTIL
int get_num_planes()
const;
66 INLINE_MATHUTIL LPlane get_plane(
int n)
const;
67 MAKE_SEQ(get_planes, get_num_planes, get_plane);
79 virtual int contains_point(
const LPoint3 &point)
const;
80 virtual int contains_lineseg(
const LPoint3 &a,
const LPoint3 &b)
const;
82 virtual int contains_box(
const BoundingBox *box)
const;
83 virtual int contains_hexahedron(
const BoundingHexahedron *hexahedron)
const;
95 LPlane _planes[num_planes];
103 static void init_type() {
104 FiniteBoundingVolume::init_type();
105 register_type(_type_handle,
"BoundingHexahedron",
106 FiniteBoundingVolume::get_class_type());
109 return get_class_type();
111 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
120 #include "boundingHexahedron.I"
An axis-aligned bounding box; that is, a minimum and maximum coordinate triple.
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 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.
virtual const BoundingHexahedron * as_bounding_hexahedron() 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.