Panda3D
geometricBoundingVolume.cxx
1 // Filename: geometricBoundingVolume.cxx
2 // Created by: drose (07Oct99)
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 #include "geometricBoundingVolume.h"
16 
17 TypeHandle GeometricBoundingVolume::_type_handle;
18 
19 
20 ////////////////////////////////////////////////////////////////////
21 // Function: GeometricBoundingVolume::as_geometric_bounding_volume
22 // Access: Public, Virtual
23 // Description: Virtual downcast method. Returns this object as a
24 // pointer of the indicated type, if it is in fact that
25 // type. Returns NULL if it is not that type.
26 ////////////////////////////////////////////////////////////////////
29  return this;
30 }
31 
32 ////////////////////////////////////////////////////////////////////
33 // Function: GeometricBoundingVolume::extend_by_point
34 // Access: Protected, Virtual
35 // Description: Extends the volume to include the indicated point.
36 // Returns true if possible, false if not.
37 ////////////////////////////////////////////////////////////////////
38 bool GeometricBoundingVolume::
39 extend_by_point(const LPoint3 &) {
40  return false;
41 }
42 
43 ////////////////////////////////////////////////////////////////////
44 // Function: GeometricBoundingVolume::around_points
45 // Access: Protected, Virtual
46 // Description: Puts the volume around the indicated list of points,
47 // identified by an STL-style begin/end list.
48 ////////////////////////////////////////////////////////////////////
49 bool GeometricBoundingVolume::
50 around_points(const LPoint3 *, const LPoint3 *) {
51  _flags = F_empty;
52  return false;
53 }
54 
55 ////////////////////////////////////////////////////////////////////
56 // Function: GeometricBoundingVolume::contains_point
57 // Access: Protected, Virtual
58 // Description: Tests whether the volume contains the indicated
59 // point.
60 ////////////////////////////////////////////////////////////////////
61 int GeometricBoundingVolume::
62 contains_point(const LPoint3 &) const {
63  return IF_dont_understand;
64 }
65 
66 ////////////////////////////////////////////////////////////////////
67 // Function: GeometricBoundingVolume::contains_lineseg
68 // Access: Protected, Virtual
69 // Description: Tests whether the volume contains the indicated line
70 // segment.
71 ////////////////////////////////////////////////////////////////////
72 int GeometricBoundingVolume::
73 contains_lineseg(const LPoint3 &, const LPoint3 &) const {
74  return IF_dont_understand;
75 }
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
Definition: lpoint3.h:99
This is another abstract class, for a general class of bounding volumes that actually enclose points ...
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
virtual const GeometricBoundingVolume * as_geometric_bounding_volume() const
Virtual downcast method.