14#ifndef GEOMETRICBOUNDINGVOLUME_H
15#define GEOMETRICBOUNDINGVOLUME_H
29class EXPCL_PANDA_MATHUTIL GeometricBoundingVolume :
public BoundingVolume {
31 INLINE_MATHUTIL GeometricBoundingVolume();
34 INLINE_MATHUTIL
bool extend_by(
const GeometricBoundingVolume *vol);
35 INLINE_MATHUTIL
bool extend_by(
const LPoint3 &point);
41 INLINE_MATHUTIL
bool around(
const GeometricBoundingVolume **first,
42 const GeometricBoundingVolume **last);
43 INLINE_MATHUTIL
bool around(
const LPoint3 *first,
const LPoint3 *last);
46 INLINE_MATHUTIL
int contains(
const GeometricBoundingVolume *vol)
const;
47 INLINE_MATHUTIL
int contains(
const LPoint3 &point)
const;
48 INLINE_MATHUTIL
int contains(
const LPoint3 &a,
const LPoint3 &b)
const;
50 virtual LPoint3 get_approx_center()
const=0;
51 virtual void xform(
const LMatrix4 &mat)=0;
61 virtual bool extend_by_point(
const LPoint3 &point);
62 virtual bool around_points(
const LPoint3 *first,
64 virtual int contains_point(
const LPoint3 &point)
const;
65 virtual int contains_lineseg(
const LPoint3 &a,
const LPoint3 &b)
const;
72 static void init_type() {
73 BoundingVolume::init_type();
75 BoundingVolume::get_class_type());
78 return get_class_type();
80 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
88INLINE
void PointerToBase<GeometricBoundingVolume>::update_type(
To *ptr) {}
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
bool extend_by(const BoundingVolume *vol)
Increases the size of the volume to include the given volume.
virtual GeometricBoundingVolume * as_geometric_bounding_volume()
Virtual downcast method.
int contains(const BoundingVolume *vol) const
Returns the appropriate set of IntersectionFlags to indicate the amount of intersection with the indi...
bool around(const BoundingVolume **first, const BoundingVolume **last)
Resets the volume to enclose only the volumes indicated.
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.
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(),...