VR-Vantage 3.1 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtTickable.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2022 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/vrvCore.h>
13 
15 
16 #include <vlutil/vlTime.h>
17 
18 
19 namespace makVrv
20 {
21  class DtTickableManagerInterface;
22 
27  {
28  public:
32  {
36  };
37 
38  public:
39 
49  virtual bool needsUpdate( DtTime tNow );
50 
52  virtual bool updateIfNeeded(DtTime tNow);
53 
56  virtual void update( DtTime tNow ) = 0;
57 
59  virtual ~DtTickable();
60 
64  virtual void setTickableEnabled( bool enabled );
66 
68 
69 
70 
71 
72  virtual void setIsThreadSafe(bool safe);
73  virtual bool isThreadSafe() const;
75 
77 
78 
79 
80 
81 
82  virtual void setTickableListState(TickableListState safeList);
83  virtual TickableListState tickableListState() const;
85 
87 
88 
89 
90 
91 
92 
93  virtual void setUpdatePeriod( unsigned int period );
94  virtual unsigned int updatePeriod() const;
95 
97  virtual bool adaptiveTickLodEnabled() const;
98 
100  protected:
107 
109  DtTickable() = delete;
110 
111  virtual void slot_managerAboutToBeDeleted();
112 
113  protected:
116 
117  protected:
119  unsigned int myFrameCounter;
120  unsigned int myFrameToUpdate;
121  unsigned int myUpdatePeriod;
122  unsigned int myTickableIndex;
123  // NOTE: Several derived updater classes also have a myLastUpdateTime
124  // member variable with its own initializer
125  // Double check whether you are modifying the child or the parent!
126  // Ideally all the children myLastUpdateTime should go away
130  };
131 }


Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)