Panda3D

intersectionBoundingVolume.I

00001 // Filename: intersectionBoundingVolume.I
00002 // Created by:  drose (08Feb12)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 
00016 
00017 ////////////////////////////////////////////////////////////////////
00018 //     Function: IntersectionBoundingVolume::Constructor
00019 //       Access: Published
00020 //  Description: Constructs an empty intersection.
00021 ////////////////////////////////////////////////////////////////////
00022 INLINE_MATHUTIL IntersectionBoundingVolume::
00023 IntersectionBoundingVolume() {
00024   _flags = F_infinite;
00025 }
00026 
00027 ////////////////////////////////////////////////////////////////////
00028 //     Function: IntersectionBoundingVolume::get_num_components
00029 //       Access: Published
00030 //  Description: Returns the number of components in the intersection.
00031 ////////////////////////////////////////////////////////////////////
00032 INLINE_MATHUTIL int IntersectionBoundingVolume::
00033 get_num_components() const {
00034   return (int)_components.size();
00035 }
00036 
00037 ////////////////////////////////////////////////////////////////////
00038 //     Function: IntersectionBoundingVolume::get_component
00039 //       Access: Published
00040 //  Description: Returns the nth component in the intersection.
00041 ////////////////////////////////////////////////////////////////////
00042 INLINE_MATHUTIL const GeometricBoundingVolume *IntersectionBoundingVolume::
00043 get_component(int n) const {
00044   nassertr(n >= 0 && n < (int)_components.size(), NULL);
00045   return _components[n];
00046 }
 All Classes Functions Variables Enumerations