VR-Forces 4.8 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 /******************************************************************************
6 ** $RCSfile: DtCachedIntersectorManager.h,v $ $Revision: 1.9 $ $State: Exp $
7 ******************************************************************************/
8 
18 
19 #pragma once
20 #include <vrvCore/vrvCore.h>
21 #include <vrvCore/DtIntersector.h>
22 
23 #include <matrix/vlVector.h>
24 #include <map>
25 
26 namespace makVrv
27 {
28  class DtIntersectorCache;
29  class DtCachedIntersector;
30 
34  {
35  public:
36  virtual ~DtCachedIntersectorManager();
37 
40  static DtCachedIntersectorManager& instance(DtDe& de);
41 
43  static void registerInstance(DtDe& de, DtCachedIntersectorManager* anInstance);
44 
46  DtCachedIntersector& modelSetIntersector(int modelSet);
47 
51  virtual void setShareIntersectionResults(bool);
52  bool shareIntersectionResults() const;
53 
57  virtual void setCacheIsPermanent(bool);
58 
60  bool cacheIsPermanent() const;
61 
63  virtual void setCacheLimit(int);
64 
66  int cacheLimit() const;
67 
69  virtual void setCacheClearTime(double);
70 
72  double cacheClearTime() const;
73 
74  protected:
76  virtual void onPostTick();
77 
79 
80  protected:
81  typedef boost::unordered_map<int, DtCachedIntersector*> IntersectorMap;
84 
86  double myClearTime;
90  };
91 }
Virtual base class.
Definition: DtVirtualBaseClass.h:22
boost::unordered_map< int, DtCachedIntersector * > IntersectorMap
Definition: DtCachedIntersectorManager.h:81
double myLastClearTime
Definition: DtCachedIntersectorManager.h:87
DtIntersectorCache * myCache
Definition: DtCachedIntersectorManager.h:89
DtDe & myDe
Definition: DtCachedIntersectorManager.h:82
the Intersector Cache class.
Definition: DtIntersectorCache.h:31
IntersectorMap myIntersectors
Definition: DtCachedIntersectorManager.h:83
int myCacheLimit
Definition: DtCachedIntersectorManager.h:88
Contains makVrv:DtIntersector, makVrv:DtIntersectorLineSegment, and makVrv:DtIntersectorResult classe...
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
bool myCacheIsPermanent
Definition: DtCachedIntersectorManager.h:85
A Cached Intersector will first look at the local cache, and, if the local cache does not have the in...
Definition: DtCachedIntersector.h:32
double myClearTime
Definition: DtCachedIntersectorManager.h:86
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:33
Contains DLL export macros.

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)