Panda3D
displayRegionCullCallbackData.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 displayRegionCullCallbackData.h
10  * @author drose
11  * @date 2009-03-14
12  */
13 
14 #ifndef DISPLAYREGIONCULLCALLBACKDATA_H
15 #define DISPLAYREGIONCULLCALLBACKDATA_H
16 
17 #include "pandabase.h"
18 #include "callbackData.h"
19 
20 class CullHandler;
21 class SceneSetup;
22 
23 /**
24  * This specialization on CallbackData is passed when the callback is
25  * initiated from the cull traversal, for a DisplayRegion.
26  */
27 class EXPCL_PANDA_DISPLAY DisplayRegionCullCallbackData : public CallbackData {
28 public:
29  DisplayRegionCullCallbackData(CullHandler *cull_handler, SceneSetup *scene_setup);
30 
31 PUBLISHED:
32  virtual void output(std::ostream &out) const;
33 
34  INLINE CullHandler *get_cull_handler() const;
35  INLINE SceneSetup *get_scene_setup() const;
36 
37  virtual void upcall();
38 
39 private:
40  CullHandler *_cull_handler;
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, "DisplayRegionCullCallbackData",
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
This specialization on CallbackData is passed when the callback is initiated from the cull traversal,...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This defines the abstract interface for an object that receives Geoms identified by the CullTraverser...
Definition: cullHandler.h:28
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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