Panda3D
finiteBoundingVolume.h
1 // Filename: finiteBoundingVolume.h
2 // Created by: drose (02Oct99)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef FINITEBOUNDINGVOLUME_H
16 #define FINITEBOUNDINGVOLUME_H
17 
18 #include "pandabase.h"
19 
20 #include "geometricBoundingVolume.h"
21 
22 
23 ////////////////////////////////////////////////////////////////////
24 // Class : FiniteBoundingVolume
25 // Description : A special kind of GeometricBoundingVolume that is
26 // known to be finite. It is possible to query this
27 // kind of volume for its minimum and maximum extents.
28 ////////////////////////////////////////////////////////////////////
29 class EXPCL_PANDA_MATHUTIL FiniteBoundingVolume : public GeometricBoundingVolume {
30 PUBLISHED:
31  virtual LPoint3 get_min() const=0;
32  virtual LPoint3 get_max() const=0;
33  virtual PN_stdfloat get_volume() const;
34 
35 public:
36  virtual const FiniteBoundingVolume *as_finite_bounding_volume() const;
37 
38 protected:
39  virtual bool around_lines(const BoundingVolume **first,
40  const BoundingVolume **last);
41  virtual bool around_planes(const BoundingVolume **first,
42  const BoundingVolume **last);
43 
44 public:
45  static TypeHandle get_class_type() {
46  return _type_handle;
47  }
48  static void init_type() {
49  GeometricBoundingVolume::init_type();
50  register_type(_type_handle, "FiniteBoundingVolume",
51  GeometricBoundingVolume::get_class_type());
52  }
53  virtual TypeHandle get_type() const {
54  return get_class_type();
55  }
56  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
57 
58 private:
59  static TypeHandle _type_handle;
60 };
61 
62 #endif
63 
64 
65 
66 
67 
68 
69 
70 
71 
72 
73 
74 
75 
76 
77 
78 
79 
80 
81 
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
Definition: lpoint3.h:99
This is an abstract class for any volume in any sense which can be said to define the locality of ref...
This is another abstract class, for a general class of bounding volumes that actually enclose points ...
virtual const FiniteBoundingVolume * as_finite_bounding_volume() 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.
Definition: typeHandle.h:85