00001 /* 00002 * PROPRIETARY INFORMATION. This software is proprietary to 00003 * Side Effects Software Inc., and is not to be reproduced, 00004 * transmitted, or disclosed in any way without written permission. 00005 * 00006 * Produced by: 00007 * Side Effects Software Inc. 00008 * 477 Richmond Street West, Suite 1001 00009 * Toronto, Ontario 00010 * Canada M5V 3E7 00011 * 416-504-9876 00012 */ 00013 00014 #ifndef __SIM_GuideTimeDep_h__ 00015 #define __SIM_GuideTimeDep_h__ 00016 00017 #include "SIM_API.h" 00018 #include <UT/UT_HashTable.h> 00019 #include "SIM_Guide.h" 00020 00021 /// This SIM_Guide subclass is a container for another type of SIM_Guide 00022 /// which is provided as a template parameter. Each object causes a new 00023 /// SIM_Guide to be generated, and requests are passed on to that contained 00024 /// SIM_Guide. 00025 template<class GuideBase> 00026 class SIM_GuideTimeDep : public GuideBase 00027 { 00028 public: 00029 /// Constructor which takes a const SIM_Data as our owner. 00030 explicit SIM_GuideTimeDep(const SIM_Data *owner) 00031 : GuideBase(owner) 00032 { 00033 } 00034 /// Constructor which takes an owner, and a flag to pass on to our base. 00035 /// This flag is used by SIM_GuideShared. 00036 explicit SIM_GuideTimeDep(const SIM_Data *owner, 00037 bool displayonce) 00038 : GuideBase(owner, displayonce) 00039 { 00040 } 00041 /// Destructor for this class. 00042 virtual ~SIM_GuideTimeDep() 00043 { 00044 } 00045 00046 protected: 00047 virtual GU_ConstDetailHandle getGuideGeometrySubclass( 00048 const SIM_RootData &root, 00049 UT_DMatrix4 &xform, 00050 const SIM_Time &t) 00051 { 00052 if( t != myTime ) 00053 { 00054 this->clear(); 00055 myTime = t; 00056 } 00057 00058 return GuideBase:: 00059 getGuideGeometrySubclass(root, 00060 xform, 00061 t); 00062 } 00063 00064 private: 00065 SIM_Time myTime; 00066 }; 00067 00068 #endif 00069
1.5.9