Panda3D
|
00001 // Filename: cullHandler.h 00002 // Created by: drose (23Feb02) 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 #ifndef CULLHANDLER_H 00016 #define CULLHANDLER_H 00017 00018 #include "pandabase.h" 00019 #include "cullableObject.h" 00020 #include "graphicsStateGuardianBase.h" 00021 00022 class CullTraverser; 00023 00024 //////////////////////////////////////////////////////////////////// 00025 // Class : CullHandler 00026 // Description : This defines the abstract interface for an object 00027 // that receives Geoms identified by the CullTraverser. 00028 // By itself, it's not a particularly useful class; to 00029 // use it, derive from it and redefine record_object(). 00030 //////////////////////////////////////////////////////////////////// 00031 class EXPCL_PANDA_PGRAPH CullHandler { 00032 public: 00033 CullHandler(); 00034 virtual ~CullHandler(); 00035 00036 virtual void record_object(CullableObject *object, 00037 const CullTraverser *traverser); 00038 virtual void end_traverse(); 00039 00040 INLINE static void draw(CullableObject *object, 00041 GraphicsStateGuardianBase *gsg, 00042 bool force, Thread *current_thread); 00043 }; 00044 00045 #include "cullHandler.I" 00046 00047 #endif 00048 00049 00050