Panda3D
|
00001 // Filename: displayRegionCullCallbackData.h 00002 // Created by: drose (14Mar09) 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 DISPLAYREGIONCULLCALLBACKDATA_H 00016 #define DISPLAYREGIONCULLCALLBACKDATA_H 00017 00018 #include "pandabase.h" 00019 #include "callbackData.h" 00020 00021 class CullHandler; 00022 class SceneSetup; 00023 00024 //////////////////////////////////////////////////////////////////// 00025 // Class : DisplayRegionCullCallbackData 00026 // Description : This specialization on CallbackData is passed when 00027 // the callback is initiated from the cull traversal, 00028 // for a DisplayRegion. 00029 //////////////////////////////////////////////////////////////////// 00030 class EXPCL_PANDA_PGRAPH DisplayRegionCullCallbackData : public CallbackData { 00031 public: 00032 DisplayRegionCullCallbackData(CullHandler *cull_handler, SceneSetup *scene_setup); 00033 00034 PUBLISHED: 00035 virtual void output(ostream &out) const; 00036 00037 INLINE CullHandler *get_cull_handler() const; 00038 INLINE SceneSetup *get_scene_setup() const; 00039 00040 virtual void upcall(); 00041 00042 private: 00043 CullHandler *_cull_handler; 00044 SceneSetup *_scene_setup; 00045 00046 public: 00047 static TypeHandle get_class_type() { 00048 return _type_handle; 00049 } 00050 static void init_type() { 00051 CallbackData::init_type(); 00052 register_type(_type_handle, "DisplayRegionCullCallbackData", 00053 CallbackData::get_class_type()); 00054 } 00055 virtual TypeHandle get_type() const { 00056 return get_class_type(); 00057 } 00058 virtual TypeHandle force_init_type() {init_type(); return get_class_type();} 00059 00060 private: 00061 static TypeHandle _type_handle; 00062 }; 00063 00064 #include "displayRegionCullCallbackData.I" 00065 00066 #endif