VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
boundingNodeInfo.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2014 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
10 #include <geometry/sphere.h>
11 #include <boost/shared_ptr.hpp>
12 #include <boost/unordered_map.hpp>
13 
14 //Stores information about a paged out bounding volume.
16 {
17  DtNodeBoundingInfo(DtSphere boundingSphere, std::string filename, bool known=false)
18  : myBoundingSphere(boundingSphere)
19  , myFilename(filename)
20  , myNumTimesRequested(0)
21  {
22  }
23 
24  virtual void expandExtent(DtExtent& ext) const
25  {
26  ext.expandToInclude(extent());
27  }
28 
29  virtual DtExtent extent() const
30  {
31  return extentOfSphere(myBoundingSphere);
32  }
33 
34  virtual std::string filename() const
35  {
36  return myFilename;
37  }
38 
40  std::string myFilename;
42 };
43 
46 {
48  DtNodeBoundingInfo boundingInfo,
49  unsigned int numTriangles,
50  DtTerrainIntersectIDType lastUsed = 0)
51  : myBoundingInfo(boundingInfo)
52  , myNumTriangles(numTriangles)
53  , myLastUsed(lastUsed)
54  , myPendingRemoval(false)
55  {
56  }
57 
60  unsigned int myNumTriangles;
62 };
63 
64 typedef DtBoost::shared_ptr< DtNodeBoundingInfo > DtNodeBoundingInfoPtr;
65 typedef DtBoost::shared_ptr< DtPagedNodeStatus > DtPagedNodeStatusPtr;
66 typedef std::list<DtNodeBoundingInfoPtr> DtNodeBoundingInfoList;
67 typedef std::set<DtNodeBoundingInfoPtr> DtNodeBoundingInfoSet;
68 typedef boost::unordered_map<DtNodeId, DtNodeBoundingInfoPtr> DtNodeBoundingInfoMap;
69 typedef boost::unordered_map<DtNodeId, DtPagedNodeStatusPtr> DtPagedNodeStatusMap;
70 

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)