Panda3D
 All Classes Functions Variables Enumerations
cullBin.I
00001 // Filename: cullBin.I
00002 // Created by:  drose (28Feb02)
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 //     Function: CullBin::Copy Constructor
00018 //       Access: Protected
00019 //  Description: 
00020 ////////////////////////////////////////////////////////////////////
00021 INLINE CullBin::
00022 CullBin(const CullBin &copy) : 
00023   _name(copy._name),
00024   _bin_type(copy._bin_type),
00025   _gsg(copy._gsg),
00026   _cull_this_pcollector(copy._cull_this_pcollector),
00027   _draw_this_pcollector(copy._draw_this_pcollector)
00028 {
00029   check_flash_color();
00030 }
00031 
00032 ////////////////////////////////////////////////////////////////////
00033 //     Function: CullBin::Constructor
00034 //       Access: Public
00035 //  Description: 
00036 ////////////////////////////////////////////////////////////////////
00037 INLINE CullBin::
00038 CullBin(const string &name, CullBin::BinType bin_type,
00039         GraphicsStateGuardianBase *gsg,
00040         const PStatCollector &draw_region_pcollector) :
00041   _name(name),
00042   _bin_type(bin_type),
00043   _gsg(gsg),
00044   _cull_this_pcollector(_cull_bin_pcollector, name),
00045   _draw_this_pcollector(draw_region_pcollector, name)
00046 {
00047   check_flash_color();
00048 }
00049 
00050 ////////////////////////////////////////////////////////////////////
00051 //     Function: CullBin::get_name
00052 //       Access: Public
00053 //  Description: 
00054 ////////////////////////////////////////////////////////////////////
00055 INLINE const string &CullBin::
00056 get_name() const {
00057   return _name;
00058 }
00059 
00060 ////////////////////////////////////////////////////////////////////
00061 //     Function: CullBin::get_bin_tyep
00062 //       Access: Public
00063 //  Description: 
00064 ////////////////////////////////////////////////////////////////////
00065 INLINE CullBin::BinType CullBin::
00066 get_bin_type() const {
00067   return _bin_type;
00068 }
00069 
00070 ////////////////////////////////////////////////////////////////////
00071 //     Function: CullBin::has_flash_color
00072 //       Access: Public
00073 //  Description: Returns true if this bin has a flash color configured
00074 //               via the flash-bin-binname config directive, or false
00075 //               otherwise.
00076 ////////////////////////////////////////////////////////////////////
00077 INLINE bool CullBin::
00078 has_flash_color() const {
00079   return _has_flash_color;
00080 }
00081 
00082 ////////////////////////////////////////////////////////////////////
00083 //     Function: CullBin::get_flash_color
00084 //       Access: Public
00085 //  Description: If has_flash_color returns true, this returns the
00086 //               color specified.
00087 ////////////////////////////////////////////////////////////////////
00088 INLINE const LColor &CullBin::
00089 get_flash_color() const {
00090   return _flash_color;
00091 }
 All Classes Functions Variables Enumerations