Panda3D

Loading...
Searching...
No Matches
intersectionBoundingVolume.I
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file intersectionBoundingVolume.I
10 * @author drose
11 * @date 2012-02-08
12 */
13
14/**
15 * Constructs an empty intersection.
16 */
17INLINE_MATHUTIL IntersectionBoundingVolume::
18 IntersectionBoundingVolume() {
19 _flags = F_infinite;
20}
21
22/**
23 * Returns the number of components in the intersection.
24 */
25INLINE_MATHUTIL int IntersectionBoundingVolume::
26 get_num_components() const {
27 return (int)_components.size();
28}
29
30/**
31 * Returns the nth component in the intersection.
32 */
33INLINE_MATHUTIL const GeometricBoundingVolume *IntersectionBoundingVolume::
34 get_component(int n) const {
35 nassertr(n >= 0 && n < (int)_components.size(), nullptr);
36 return _components[n];
37}
GeometricBoundingVolume
This is another abstract class, for a general class of bounding volumes that actually enclose points ...
Definition geometricBoundingVolume.h:29
IntersectionBoundingVolume::get_component
get_component
Returns the nth component in the intersection.
Definition intersectionBoundingVolume.h:49
IntersectionBoundingVolume::get_num_components
get_num_components
Returns the number of components in the intersection.
Definition intersectionBoundingVolume.h:49
IntersectionBoundingVolume::IntersectionBoundingVolume
IntersectionBoundingVolume()
Constructs an empty intersection.
Definition intersectionBoundingVolume.I:18