Panda3D
nodeCullCallbackData.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 nodeCullCallbackData.h
10  * @author drose
11  * @date 2009-03-13
12  */
13 
14 #ifndef NODECULLCALLBACKDATA_H
15 #define NODECULLCALLBACKDATA_H
16 
17 #include "pandabase.h"
18 #include "callbackData.h"
19 #include "cullTraverser.h"
20 #include "cullTraverserData.h"
21 
22 /**
23  * This kind of CallbackData is passed to the CallbackObject added to
24  * CallbackNode:set_cull_callback().
25  */
26 class EXPCL_PANDA_PGRAPHNODES NodeCullCallbackData : public CallbackData {
27 public:
29 
30 PUBLISHED:
31  virtual void output(std::ostream &out) const;
32 
33  INLINE CullTraverser *get_trav() const;
34  INLINE CullTraverserData &get_data() const;
35 
36  virtual void upcall();
37 
38 private:
39  CullTraverser *_trav;
40  CullTraverserData &_data;
41 
42 public:
43  static TypeHandle get_class_type() {
44  return _type_handle;
45  }
46  static void init_type() {
47  CallbackData::init_type();
48  register_type(_type_handle, "NodeCullCallbackData",
49  CallbackData::get_class_type());
50  }
51  virtual TypeHandle get_type() const {
52  return get_class_type();
53  }
54  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
55 
56 private:
57  static TypeHandle _type_handle;
58 };
59 
60 #include "nodeCullCallbackData.I"
61 
62 #endif
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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 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:29
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81
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:45