Panda3D
displayRegionCullCallbackData.h
1 // Filename: displayRegionCullCallbackData.h
2 // Created by: drose (14Mar09)
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 DISPLAYREGIONCULLCALLBACKDATA_H
16 #define DISPLAYREGIONCULLCALLBACKDATA_H
17 
18 #include "pandabase.h"
19 #include "callbackData.h"
20 
21 class CullHandler;
22 class SceneSetup;
23 
24 ////////////////////////////////////////////////////////////////////
25 // Class : DisplayRegionCullCallbackData
26 // Description : This specialization on CallbackData is passed when
27 // the callback is initiated from the cull traversal,
28 // for a DisplayRegion.
29 ////////////////////////////////////////////////////////////////////
30 class EXPCL_PANDA_PGRAPH DisplayRegionCullCallbackData : public CallbackData {
31 public:
32  DisplayRegionCullCallbackData(CullHandler *cull_handler, SceneSetup *scene_setup);
33 
34 PUBLISHED:
35  virtual void output(ostream &out) const;
36 
37  INLINE CullHandler *get_cull_handler() const;
38  INLINE SceneSetup *get_scene_setup() const;
39 
40  virtual void upcall();
41 
42 private:
43  CullHandler *_cull_handler;
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, "DisplayRegionCullCallbackData",
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 "displayRegionCullCallbackData.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 cull traversal...
This defines the abstract interface for an object that receives Geoms identified by the CullTraverser...
Definition: cullHandler.h:31
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