00001 // Filename: cullResult.I 00002 // Created by: drose (28Feb02) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved 00008 // 00009 // All use of this software is subject to the terms of the Panda 3d 00010 // Software license. You should have received a copy of this license 00011 // along with this source code; you will also find a current copy of 00012 // the license at http://www.panda3d.org/license.txt . 00013 // 00014 // To contact the maintainers of this program write to 00015 // panda3d@yahoogroups.com . 00016 // 00017 //////////////////////////////////////////////////////////////////// 00018 00019 00020 //////////////////////////////////////////////////////////////////// 00021 // Function: CullResult::Constructor 00022 // Access: Public 00023 // Description: 00024 //////////////////////////////////////////////////////////////////// 00025 INLINE CullResult:: 00026 CullResult(GraphicsStateGuardianBase *gsg) : 00027 _gsg(gsg) 00028 { 00029 } 00030 00031 //////////////////////////////////////////////////////////////////// 00032 // Function: CullResult::Destructor 00033 // Access: Public 00034 // Description: 00035 //////////////////////////////////////////////////////////////////// 00036 INLINE CullResult:: 00037 ~CullResult() { 00038 } 00039 00040 //////////////////////////////////////////////////////////////////// 00041 // Function: CullResult::get_bin 00042 // Access: Public 00043 // Description: Returns the CullBin associated with the indicated 00044 // bin_index, or NULL if the bin_index is invalid. If 00045 // there is the first time this bin_index has been 00046 // requested for this CullResult, creates a new CullBin 00047 // object on the fly. 00048 //////////////////////////////////////////////////////////////////// 00049 INLINE CullBin *CullResult:: 00050 get_bin(int bin_index) { 00051 if (bin_index >= 0 && bin_index < (int)_bins.size() && 00052 _bins[bin_index] != (CullBin *)NULL) { 00053 return _bins[bin_index]; 00054 } 00055 return make_new_bin(bin_index); 00056 }