Panda3D
 All Classes Functions Variables Enumerations
nodeCullCallbackData.h
1 // Filename: nodeCullCallbackData.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 NODECULLCALLBACKDATA_H
16 #define NODECULLCALLBACKDATA_H
17 
18 #include "pandabase.h"
19 #include "callbackData.h"
20 #include "cullTraverser.h"
21 #include "cullTraverserData.h"
22 
23 ////////////////////////////////////////////////////////////////////
24 // Class : NodeCullCallbackData
25 // Description : This kind of CallbackData is passed to the
26 // CallbackObject added to
27 // CallbackNode:set_cull_callback().
28 ////////////////////////////////////////////////////////////////////
29 class EXPCL_PANDA_PGRAPHNODES NodeCullCallbackData : public CallbackData {
30 public:
32 
33 PUBLISHED:
34  virtual void output(ostream &out) const;
35 
36  INLINE CullTraverser *get_trav() const;
37  INLINE CullTraverserData &get_data() const;
38 
39  virtual void upcall();
40 
41 private:
42  CullTraverser *_trav;
43  CullTraverserData &_data;
44 
45 public:
46  static TypeHandle get_class_type() {
47  return _type_handle;
48  }
49  static void init_type() {
50  CallbackData::init_type();
51  register_type(_type_handle, "NodeCullCallbackData",
52  CallbackData::get_class_type());
53  }
54  virtual TypeHandle get_type() const {
55  return get_class_type();
56  }
57  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
58 
59 private:
60  static TypeHandle _type_handle;
61 };
62 
63 #include "nodeCullCallbackData.I"
64 
65 #endif
virtual void upcall()
You should make this call during the callback if you want to continue the normal function that would ...
This collects together the pieces of data that are accumulated for each node while walking the scene ...
This is a generic data block that is passed along to a CallbackObject when a callback is made...
Definition: callbackData.h:32
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
This kind of CallbackData is passed to the CallbackObject added to CallbackNode:set_cull_callback().
This object performs a depth-first traversal of the scene graph, with optional view-frustum culling...
Definition: cullTraverser.h:48