Panda3D
deferredNodeProperty.h
1 // Filename: deferredNodeProperty.h
2 // Created by: drose (20Mar02)
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 DEFERREDNODEPROPERTY_H
16 #define DEFERREDNODEPROPERTY_H
17 
18 #include "pandabase.h"
19 
20 #include "collideMask.h"
21 #include "pmap.h"
22 
23 class PandaNode;
24 
25 ////////////////////////////////////////////////////////////////////
26 // Class : DeferredNodeProperty
27 // Description : This class keeps track of all the state we must make
28 // note of during the graph traversal, but cannot apply
29 // immediately. An instance of this class may be
30 // assigned to nodes as they are created, and then later,
31 // after the geometry has been created, the graph will
32 // be traversed again and the state will be applied.
33 //
34 // This class is only local to this package; it is not
35 // exported.
36 ////////////////////////////////////////////////////////////////////
38 public:
41  void operator = (const DeferredNodeProperty &copy);
42 
43  void compose(const DeferredNodeProperty &other);
44 
45  void apply_to_node(PandaNode *node);
46 
47 
48 public:
49  enum Flags {
50  F_has_from_collide_mask = 0x0001,
51  F_has_into_collide_mask = 0x0002,
52  };
53 
54  int _flags;
55  CollideMask _from_collide_mask;
56  CollideMask _into_collide_mask;
57 };
58 
60 
61 
62 #endif
A basic node of the scene graph or data graph.
Definition: pandaNode.h:72
This class keeps track of all the state we must make note of during the graph traversal, but cannot apply immediately.
void apply_to_node(PandaNode *node)
Applies whatever state is appropriate to the node.
void compose(const DeferredNodeProperty &other)
Composes this state with the next one encountered on a lower node during the apply traversal...