Panda3D
|
00001 // Filename: displayRegionDrawCallbackData.h 00002 // Created by: drose (13Mar09) 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 DISPLAYREGIONDRAWCALLBACKDATA_H 00016 #define DISPLAYREGIONDRAWCALLBACKDATA_H 00017 00018 #include "pandabase.h" 00019 #include "callbackData.h" 00020 00021 class CullResult; 00022 class SceneSetup; 00023 00024 //////////////////////////////////////////////////////////////////// 00025 // Class : DisplayRegionDrawCallbackData 00026 // Description : This specialization on CallbackData is passed when 00027 // the callback is initiated from the draw traversal, 00028 // for a DisplayRegion. 00029 //////////////////////////////////////////////////////////////////// 00030 class EXPCL_PANDA_PGRAPH DisplayRegionDrawCallbackData : public CallbackData { 00031 public: 00032 DisplayRegionDrawCallbackData(CullResult *cull_result, SceneSetup *scene_setup); 00033 00034 PUBLISHED: 00035 virtual void output(ostream &out) const; 00036 00037 INLINE CullResult *get_cull_result() const; 00038 INLINE SceneSetup *get_scene_setup() const; 00039 00040 virtual void upcall(); 00041 00042 private: 00043 CullResult *_cull_result; 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, "DisplayRegionDrawCallbackData", 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 "displayRegionDrawCallbackData.I" 00065 00066 #endif