Panda3D

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