Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

panda/src/pgraph/cullBin.h

Go to the documentation of this file.
00001 // Filename: cullBin.h
00002 // Created by:  drose (27Feb02)
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 #ifndef CULLBIN_H
00020 #define CULLBIN_H
00021 
00022 #include "pandabase.h"
00023 
00024 #include "typedReferenceCount.h"
00025 #include "pointerTo.h"
00026 
00027 class CullableObject;
00028 class GraphicsStateGuardianBase;
00029 
00030 ////////////////////////////////////////////////////////////////////
00031 //       Class : CullBin
00032 // Description : A collection of Geoms and their associated state, for
00033 //               a particular scene.  The cull traversal (and the
00034 //               BinCullHandler) assigns Geoms to bins as it comes
00035 //               across them.
00036 //
00037 //               This is an abstract base class; derived classes like
00038 //               CullBinStateSorted and CullBinBackToFront provide the
00039 //               actual implementation.
00040 ////////////////////////////////////////////////////////////////////
00041 class EXPCL_PANDA CullBin : public TypedReferenceCount {
00042 public:
00043   INLINE CullBin(GraphicsStateGuardianBase *gsg);
00044   virtual ~CullBin();
00045 
00046   virtual PT(CullBin) make_next() const;
00047 
00048   virtual void add_object(CullableObject *object)=0;
00049   virtual void finish_cull();
00050 
00051   virtual void draw()=0;
00052 
00053 protected:
00054   GraphicsStateGuardianBase *_gsg;
00055 
00056 public:
00057   static TypeHandle get_class_type() {
00058     return _type_handle;
00059   }
00060   static void init_type() {
00061     TypedReferenceCount::init_type();
00062     register_type(_type_handle, "CullBin",
00063                   TypedReferenceCount::get_class_type());
00064   }
00065   virtual TypeHandle get_type() const {
00066     return get_class_type();
00067   }
00068   virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00069 
00070 private:
00071   static TypeHandle _type_handle;
00072 };
00073 
00074 #include "cullBin.I"
00075 
00076 #endif
00077 
00078 
00079   

Generated on Fri May 2 00:41:22 2003 for Panda by doxygen1.3