HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SIM_GuideTimeDep.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  */
7 
8 #ifndef __SIM_GuideTimeDep_h__
9 #define __SIM_GuideTimeDep_h__
10 
11 #include "SIM_API.h"
12 #include "SIM_Guide.h"
13 #include "SIM_Time.h"
14 
15 /// This SIM_Guide subclass is a container for another type of SIM_Guide
16 /// which is provided as a template parameter. Each object causes a new
17 /// SIM_Guide to be generated, and requests are passed on to that contained
18 /// SIM_Guide.
19 template<class GuideBase>
20 class SIM_GuideTimeDep : public GuideBase
21 {
22 public:
23  /// Constructor which takes a const SIM_Data as our owner.
24  explicit SIM_GuideTimeDep(const SIM_Data *owner)
25  : GuideBase(owner)
26  {
27  }
28  /// Constructor which takes an owner, and a flag to pass on to our base.
29  /// This flag is used by SIM_GuideShared.
30  explicit SIM_GuideTimeDep(const SIM_Data *owner,
31  bool displayonce)
32  : GuideBase(owner, displayonce)
33  {
34  }
35  /// Destructor for this class.
36  ~SIM_GuideTimeDep() override
37  {
38  }
39 
40 protected:
42  const SIM_RootData &root,
43  UT_DMatrix4 &xform,
44  const SIM_Time &t) override
45  {
46  if( t != myTime )
47  {
48  this->clear();
49  myTime = t;
50  }
51 
52  return GuideBase::
53  getGuideGeometrySubclass(root,
54  xform,
55  t);
56  }
57 
58 private:
59  SIM_Time myTime;
60 };
61 
62 #endif
63 
GU_ConstDetailHandle getGuideGeometrySubclass(const SIM_RootData &root, UT_DMatrix4 &xform, const SIM_Time &t) override
~SIM_GuideTimeDep() override
Destructor for this class.
GLdouble t
Definition: glad.h:2397
SIM_GuideTimeDep(const SIM_Data *owner)
Constructor which takes a const SIM_Data as our owner.
SIM_GuideTimeDep(const SIM_Data *owner, bool displayonce)