VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtCachedIntersectorManager.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2010 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
15 
16 #pragma once
17 #include <vrvCore/vrvCore.h>
18 #include <vrvCore/DtIntersector.h>
19 
20 #include <matrix/vlVector.h>
21 #include <map>
22 
23 namespace makVrv
24 {
25  class DtIntersectorCache;
26  class DtCachedIntersector;
27 
31  {
32  public:
33  virtual ~DtCachedIntersectorManager();
34 
37  static DtCachedIntersectorManager& instance(DtDe& de);
38 
40  static void registerInstance(DtDe& de, DtCachedIntersectorManager* anInstance);
41 
43  DtCachedIntersector& modelSetIntersector(int modelSet);
44 
48  virtual void setShareIntersectionResults(bool);
49  bool shareIntersectionResults() const;
50 
54  virtual void setCacheIsPermanent(bool);
55 
57  bool cacheIsPermanent() const;
58 
60  virtual void setCacheLimit(int);
61 
63  int cacheLimit() const;
64 
66  virtual void setCacheClearTime(double);
67 
69  double cacheClearTime() const;
70 
71  protected:
73  virtual void onPostTick();
74 
76 
77  protected:
78  typedef boost::unordered_map<int, DtCachedIntersector*> IntersectorMap;
81 
83  double myClearTime;
87  };
88 }
Virtual base class.
Definition: DtVirtualBaseClass.h:19
boost::unordered_map< int, DtCachedIntersector * > IntersectorMap
Definition: DtCachedIntersectorManager.h:78
double myLastClearTime
Definition: DtCachedIntersectorManager.h:84
DtIntersectorCache * myCache
Definition: DtCachedIntersectorManager.h:86
DtDe & myDe
Definition: DtCachedIntersectorManager.h:79
the Intersector Cache class.
Definition: DtIntersectorCache.h:28
IntersectorMap myIntersectors
Definition: DtCachedIntersectorManager.h:80
int myCacheLimit
Definition: DtCachedIntersectorManager.h:85
Contains makVrv:DtIntersector, makVrv:DtIntersectorLineSegment, and makVrv:DtIntersectorResult classe...
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
bool myCacheIsPermanent
Definition: DtCachedIntersectorManager.h:82
A Cached Intersector will first look at the local cache, and, if the local cache does not have the in...
Definition: DtCachedIntersector.h:29
double myClearTime
Definition: DtCachedIntersectorManager.h:83
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
The DtCachedIntersectorManager class manages instances of cached inter sectors.
Definition: DtCachedIntersectorManager.h:30
Contains DLL export macros.

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)