Panda3D
dataGraphTraverser.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 dataGraphTraverser.h
10  * @author drose
11  * @date 2002-03-11
12  */
13 
14 #ifndef DATAGRAPHTRAVERSER_H
15 #define DATAGRAPHTRAVERSER_H
16 
17 #include "pandabase.h"
18 
19 #include "dataNodeTransmit.h"
20 #include "pvector.h"
21 #include "pmap.h"
22 
23 class DataNode;
24 class PandaNode;
25 
26 /**
27  * This object supervises the traversal of the data graph and the moving of
28  * data from one DataNode to its children. The data graph is used to manage
29  * data from input devices, etc. See the overview of the data graph in
30  * dataNode.h.
31  */
32 class EXPCL_PANDA_DGRAPH DataGraphTraverser {
33 PUBLISHED:
34  explicit DataGraphTraverser(Thread *current_thread = Thread::get_current_thread());
36 
37  INLINE Thread *get_current_thread() const;
38 
39  void traverse(PandaNode *node);
40  void traverse_below(PandaNode *node, const DataNodeTransmit &output);
41  void collect_leftovers();
42 
43 private:
44  void r_transmit(DataNode *data_node, const DataNodeTransmit inputs[]);
45 
47 
48  Thread *_current_thread;
49 
50  class CollectedData {
51  public:
52  INLINE CollectedData();
53  void set_data(int parent_index, const DataNodeTransmit &data);
54 
55  int _num_parents;
56  DataVector _data;
57  };
59  MultipassData _multipass_data;
60 };
61 
62 #include "dataGraphTraverser.I"
63 
64 #endif
A basic node of the scene graph or data graph.
Definition: pandaNode.h:64
The fundamental type of node for the data graph.
Definition: dataNode.h:52
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A thread; that is, a lightweight process.
Definition: thread.h:46
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Encapsulates the data generated from (or sent into) any particular DataNode.
This object supervises the traversal of the data graph and the moving of data from one DataNode to it...