VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtCachedIntersectorsContainer.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2022 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
15 
16 #pragma once
17 #include <vrvCore/vrvCore.h>
18 #include <vrvCore/DtIntersector.h>
19 
21 
22 #include <matrix/vlVector.h>
23 #include <map>
24 #include <unordered_map>
25 
26 namespace makVrv
27 {
28  class DtIntersectorCache;
29  class DtCachedIntersector;
30 
33 
36 
38  template <>
39  inline const char* creatorTypeName<DtCachedIntersectorsContainer>(void) { return "DtCachedIntersectorsContainerCreator"; }
40 
44  {
45  public:
47 
49 
50  public:
52  virtual DtCachedIntersector* findIntersector(DtModelSetId modelSet);
53 
57  virtual void registerModelSet(DtModelSetId modelSet);
58 
60  virtual bool modelSetRegistered(DtModelSetId modelSet) const;
61 
65  virtual void setShareIntersectionResults(bool);
66  virtual bool shareIntersectionResults() const;
67 
71  virtual void setCacheIsPermanent(bool);
72 
74  virtual bool cacheIsPermanent() const;
75 
77  virtual void setCacheLimit(int);
78 
80  virtual int cacheLimit() const;
81 
83  virtual void setCacheClearTime(double);
84 
86  virtual double cacheClearTime() const;
87 
88  protected:
90  virtual void onPostTick();
91 
93 
94  protected:
96  std::unordered_map<DtModelSetId, DtCachedIntersector*> myIntersectors;
97 
99  double myClearTime;
103  };
104 }
double myLastClearTime
Definition: DtCachedIntersectorsContainer.h:100
friend DtCachedIntersectorsContainerCreator
Definition: DtCachedIntersectorsContainer.h:46
int myCacheLimit
Definition: DtCachedIntersectorsContainer.h:101
DtVirtualBaseClassCreator< DtCachedIntersectorsContainer > DtCachedIntersectorsContainerCreator
creator
Definition: DtCachedIntersectorsContainer.h:32
DtDe & myDe
Definition: DtCachedIntersectorsContainer.h:95
the Intersector Cache class. Use to store intersection and intersection results. Can only be used to ...
Definition: DtIntersectorCache.h:28
DtIntersectorCache * myCache
Definition: DtCachedIntersectorsContainer.h:102
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:23
Contains makVrv:DtIntersector class.
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
A Cached Intersector will first look at the local cache, and, if the local cache does not have the in...
Definition: DtCachedIntersector.h:31
bool myCacheIsPermanent
Definition: DtCachedIntersectorsContainer.h:98
The DtCachedIntersectorsContainer class contains instances of cached intersectors of different model ...
Definition: DtCachedIntersectorsContainer.h:43
std::unordered_map< DtModelSetId, DtCachedIntersector * > myIntersectors
Definition: DtCachedIntersectorsContainer.h:96
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76
DtModelSetId
Definition: DtModelSetEnums.h:19
const char * creatorTypeName< DtCachedIntersectorsContainer >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtCachedIntersectorsContainer.h:39
double myClearTime
Definition: DtCachedIntersectorsContainer.h:99
Contains DLL export macros.

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)