Panda3D
|
00001 // Filename: partBundleHandle.h 00002 // Created by: drose (01Oct07) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef PARTBUNDLEHANDLE_H 00016 #define PARTBUNDLEHANDLE_H 00017 00018 #include "pandabase.h" 00019 00020 #include "partBundle.h" 00021 #include "pointerTo.h" 00022 00023 //////////////////////////////////////////////////////////////////// 00024 // Class : PartBundleHandle 00025 // Description : This is a trivial class returned by 00026 // PartBundleNode::get_bundle(). Its purpose is to hold 00027 // the actual PartBundle pointer contained within the 00028 // PartBundleNode, so that scene graph flatten 00029 // operations can safely combine or duplicate 00030 // PartBundles as necessary without affecting high-level 00031 // bundle operations. 00032 // 00033 // The high-level Actor class defined in 00034 // direct/src/actor, for instance, will store a list of 00035 // PartBundleHandles instead of on actual PartBundles, 00036 // so that it will be immune to changes from these 00037 // flatten operations. 00038 //////////////////////////////////////////////////////////////////// 00039 class EXPCL_PANDA_CHAN PartBundleHandle : public ReferenceCount { 00040 PUBLISHED: 00041 INLINE PartBundleHandle(PartBundle *bundle); 00042 INLINE ~PartBundleHandle(); 00043 00044 INLINE PartBundle *get_bundle(); 00045 INLINE void set_bundle(PartBundle *bundle); 00046 00047 private: 00048 PT(PartBundle) _bundle; 00049 }; 00050 00051 #include "partBundleHandle.I" 00052 00053 #endif