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