VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
preloadCommandManager.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2010 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
15 
16 #include <tbb/tbb_thread.h>
17 #include <tbb/mutex.h>
18 
20 
25 {
26 public:
27 
29  const int defaultPriority);
30 
32 
35  virtual void tick();
36 
40  virtual void addPreloadGeometry(
41  const DtTerrainPagingGeometryList& geometryList,
42  DtTerrainIntersectIDType intersectId);
43 
46  virtual void startPreloadCommandThread();
49  void stopPreloadCommandThread();
50 
53  bool threadShouldExit() const;
54 
56  void shutdown();
57 
58 protected:
59 
60  static void threadMain(DtPreloadCommandManager* commandManager);
61 
64 
67 
71 
72  std::auto_ptr<tbb::tbb_thread> myPreloadCommandThread;
73  mutable tbb::mutex myShutdownMutex;
75 };
tbb::concurrent_queue< std::pair< DtPagingMetaDataPtr, DtTerrainPagingGeometryPtr > > DtPreloadGeometryQueue
Definition: vantageTerrainImplementationUtil.h:42
std::list< std::pair< DtPagingMetaDataPtr, DtTerrainPagingGeometryPtr > > DtTerrainPagingGeometryList
Definition: terrainPagingGeometry.h:104
This class keeps track of what parts of the terrain database are currently paged in and what ones are...
Definition: activePageTracker.h:38
DtActivePageTracker * myPageTracker
page tracker to call pageInData on.
Definition: preloadCommandManager.h:63
int myDefaultPreloadPriority
The default priority to call with pageInData if not supplied with the preload geometry.
Definition: preloadCommandManager.h:70
bool myThreadShutdown
Definition: preloadCommandManager.h:74
Each tick, the preload command manager takes any new preload geometry that has been added to its queu...
Definition: preloadCommandManager.h:24
tbb::mutex myShutdownMutex
Definition: preloadCommandManager.h:73
#define DT_DLL_vantageTerrainImplementation
This file is used to determine how to build.
Definition: vantageTerrainImplementationDefines.h:28
DtPreloadGeometryQueue myGeometryQueue
Geometry is put on this queue and processed each tick.
Definition: preloadCommandManager.h:66
std::auto_ptr< tbb::tbb_thread > myPreloadCommandThread
Definition: preloadCommandManager.h:72

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)