Panda3D
pgCullTraverser.h
1 // Filename: pgCullTraverser.h
2 // Created by: drose (14Mar02)
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 PGCULLTRAVERSER_H
16 #define PGCULLTRAVERSER_H
17 
18 #include "pandabase.h"
19 
20 #include "pgTop.h"
21 #include "cullTraverser.h"
22 
23 ////////////////////////////////////////////////////////////////////
24 // Class : PGCullTraverser
25 // Description : This is a specialization of CullTraverser for use
26 // within the pgui system. It is substituted in for the
27 // normal CullTraverser by the PGTop node. Its purpose
28 // is to carry additional data through the traversal so
29 // that PGItems can know how to register their regions
30 // with the current MouseWatcherGroup.
31 ////////////////////////////////////////////////////////////////////
32 class EXPCL_PANDA_PGUI PGCullTraverser : public CullTraverser {
33 public:
34  INLINE PGCullTraverser(PGTop *top, CullTraverser *trav);
35 
36  PGTop *_top;
37  int _sort_index;
38 
39 public:
40  static TypeHandle get_class_type() {
41  return _type_handle;
42  }
43  static void init_type() {
44  CullTraverser::init_type();
45  register_type(_type_handle, "PGCullTraverser",
46  CullTraverser::get_class_type());
47  }
48  virtual TypeHandle get_type() const {
49  return get_class_type();
50  }
51  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
52 
53 private:
54  static TypeHandle _type_handle;
55 };
56 
57 #include "pgCullTraverser.I"
58 
59 #endif
60 
61 
62 
The "top" node of the new Panda GUI system.
Definition: pgTop.h:43
This is a specialization of CullTraverser for use within the pgui system.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
This object performs a depth-first traversal of the scene graph, with optional view-frustum culling...
Definition: cullTraverser.h:48