Panda3D
intersectionBoundingVolume.I
1 // Filename: intersectionBoundingVolume.I
2 // Created by: drose (08Feb12)
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 
16 
17 ////////////////////////////////////////////////////////////////////
18 // Function: IntersectionBoundingVolume::Constructor
19 // Access: Published
20 // Description: Constructs an empty intersection.
21 ////////////////////////////////////////////////////////////////////
22 INLINE_MATHUTIL IntersectionBoundingVolume::
24  _flags = F_infinite;
25 }
26 
27 ////////////////////////////////////////////////////////////////////
28 // Function: IntersectionBoundingVolume::get_num_components
29 // Access: Published
30 // Description: Returns the number of components in the intersection.
31 ////////////////////////////////////////////////////////////////////
32 INLINE_MATHUTIL int IntersectionBoundingVolume::
34  return (int)_components.size();
35 }
36 
37 ////////////////////////////////////////////////////////////////////
38 // Function: IntersectionBoundingVolume::get_component
39 // Access: Published
40 // Description: Returns the nth component in the intersection.
41 ////////////////////////////////////////////////////////////////////
43 get_component(int n) const {
44  nassertr(n >= 0 && n < (int)_components.size(), NULL);
45  return _components[n];
46 }
int get_num_components() const
Returns the number of components in the intersection.
This is another abstract class, for a general class of bounding volumes that actually enclose points ...
const GeometricBoundingVolume * get_component(int n) const
Returns the nth component in the intersection.
IntersectionBoundingVolume()
Constructs an empty intersection.