Panda3D
 All Classes Functions Variables Enumerations
partBundleHandle.h
1 // Filename: partBundleHandle.h
2 // Created by: drose (01Oct07)
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 PARTBUNDLEHANDLE_H
16 #define PARTBUNDLEHANDLE_H
17 
18 #include "pandabase.h"
19 
20 #include "partBundle.h"
21 #include "pointerTo.h"
22 
23 ////////////////////////////////////////////////////////////////////
24 // Class : PartBundleHandle
25 // Description : This is a trivial class returned by
26 // PartBundleNode::get_bundle(). Its purpose is to hold
27 // the actual PartBundle pointer contained within the
28 // PartBundleNode, so that scene graph flatten
29 // operations can safely combine or duplicate
30 // PartBundles as necessary without affecting high-level
31 // bundle operations.
32 //
33 // The high-level Actor class defined in
34 // direct/src/actor, for instance, will store a list of
35 // PartBundleHandles instead of on actual PartBundles,
36 // so that it will be immune to changes from these
37 // flatten operations.
38 ////////////////////////////////////////////////////////////////////
39 class EXPCL_PANDA_CHAN PartBundleHandle : public ReferenceCount {
40 PUBLISHED:
41  INLINE PartBundleHandle(PartBundle *bundle);
42  INLINE ~PartBundleHandle();
43 
44  INLINE PartBundle *get_bundle();
45  INLINE void set_bundle(PartBundle *bundle);
46 
47 private:
48  PT(PartBundle) _bundle;
49 };
50 
51 #include "partBundleHandle.I"
52 
53 #endif
This is a trivial class returned by PartBundleNode::get_bundle().
A base class for all things that want to be reference-counted.
This is the root of a MovingPart hierarchy.
Definition: partBundle.h:49