Panda3D
 All Classes Functions Variables Enumerations
displayRegionDrawCallbackData.h
1 // Filename: displayRegionDrawCallbackData.h
2 // Created by: drose (13Mar09)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef DISPLAYREGIONDRAWCALLBACKDATA_H
16 #define DISPLAYREGIONDRAWCALLBACKDATA_H
17 
18 #include "pandabase.h"
19 #include "callbackData.h"
20 
21 class CullResult;
22 class SceneSetup;
23 
24 ////////////////////////////////////////////////////////////////////
25 // Class : DisplayRegionDrawCallbackData
26 // Description : This specialization on CallbackData is passed when
27 // the callback is initiated from the draw traversal,
28 // for a DisplayRegion.
29 ////////////////////////////////////////////////////////////////////
30 class EXPCL_PANDA_PGRAPH DisplayRegionDrawCallbackData : public CallbackData {
31 public:
32  DisplayRegionDrawCallbackData(CullResult *cull_result, SceneSetup *scene_setup);
33 
34 PUBLISHED:
35  virtual void output(ostream &out) const;
36 
37  INLINE CullResult *get_cull_result() const;
38  INLINE SceneSetup *get_scene_setup() const;
39 
40  virtual void upcall();
41 
42 private:
43  CullResult *_cull_result;
44  SceneSetup *_scene_setup;
45 
46 public:
47  static TypeHandle get_class_type() {
48  return _type_handle;
49  }
50  static void init_type() {
51  CallbackData::init_type();
52  register_type(_type_handle, "DisplayRegionDrawCallbackData",
53  CallbackData::get_class_type());
54  }
55  virtual TypeHandle get_type() const {
56  return get_class_type();
57  }
58  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
59 
60 private:
61  static TypeHandle _type_handle;
62 };
63 
64 #include "displayRegionDrawCallbackData.I"
65 
66 #endif
virtual void upcall()
You should make this call during the callback if you want to continue the normal function that would ...
This is a generic data block that is passed along to a CallbackObject when a callback is made...
Definition: callbackData.h:32
This specialization on CallbackData is passed when the callback is initiated from the draw traversal...
This stores the result of a BinCullHandler traversal: an ordered collection of CullBins, each of which holds a number of Geoms and RenderStates to be rendered in some defined order.
Definition: cullResult.h:47
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
This object holds the camera position, etc., and other general setup information for rendering a part...
Definition: sceneSetup.h:35