Panda3D
displayRegionDrawCallbackData.h
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file displayRegionDrawCallbackData.h
10  * @author drose
11  * @date 2009-03-13
12  */
13 
14 #ifndef DISPLAYREGIONDRAWCALLBACKDATA_H
15 #define DISPLAYREGIONDRAWCALLBACKDATA_H
16 
17 #include "pandabase.h"
18 #include "callbackData.h"
19 
20 class CullResult;
21 class SceneSetup;
22 
23 /**
24  * This specialization on CallbackData is passed when the callback is
25  * initiated from the draw traversal, for a DisplayRegion.
26  */
27 class EXPCL_PANDA_DISPLAY DisplayRegionDrawCallbackData : public CallbackData {
28 public:
29  DisplayRegionDrawCallbackData(CullResult *cull_result, SceneSetup *scene_setup);
30 
31 PUBLISHED:
32  virtual void output(std::ostream &out) const;
33 
34  INLINE CullResult *get_cull_result() const;
35  INLINE SceneSetup *get_scene_setup() const;
36 
37  virtual void upcall();
38 
39 private:
40  CullResult *_cull_result;
41  SceneSetup *_scene_setup;
42 
43 public:
44  static TypeHandle get_class_type() {
45  return _type_handle;
46  }
47  static void init_type() {
48  CallbackData::init_type();
49  register_type(_type_handle, "DisplayRegionDrawCallbackData",
50  CallbackData::get_class_type());
51  }
52  virtual TypeHandle get_type() const {
53  return get_class_type();
54  }
55  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
56 
57 private:
58  static TypeHandle _type_handle;
59 };
60 
62 
63 #endif
virtual void upcall()
You should make this call during the callback if you want to continue the normal function that would ...
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
Definition: register_type.I:22
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is a generic data block that is passed along to a CallbackObject when a callback is made.
Definition: callbackData.h:29
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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,...
Definition: cullResult.h:44
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81
This object holds the camera position, etc., and other general setup information for rendering a part...
Definition: sceneSetup.h:32