VR-Forces 4.3 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& extent) const
25  {
26  extent.expandToInclude(extentOfSphere(DtSphere(
27  myTopoCenter, myBoundingSphere.radius())));
28  }
29 
30  virtual DtExtent extent() const
31  {
32  return DtExtent(extentOfSphere(DtSphere(myTopoCenter, myBoundingSphere.radius())));
33  }
34 
35  virtual std::string filename() const
36  {
37  return myFilename;
38  }
39 
40  DtSphere myBoundingSphere;
41  std::string myFilename;
43  mutable DtPoint myTopoCenter;
44 };
45 
48 {
50  DtNodeBoundingInfo boundingInfo,
51  unsigned int numTriangles,
52  DtTerrainIntersectIDType lastUsed = 0)
53  : myBoundingInfo(boundingInfo)
54  , myNumTriangles(numTriangles)
55  , myLastUsed(lastUsed)
56  , myPendingRemoval(false)
57  {
58  }
59 
62  unsigned int myNumTriangles;
64 };
65 
66 typedef DtBoost::shared_ptr< DtNodeBoundingInfo > DtNodeBoundingInfoPtr;
67 typedef DtBoost::shared_ptr< DtPagedNodeStatus > DtPagedNodeStatusPtr;
68 typedef std::list<DtNodeBoundingInfoPtr> DtNodeBoundingInfoList;
69 typedef std::set<DtNodeBoundingInfoPtr> DtNodeBoundingInfoSet;
70 typedef boost::unordered_map<DtNodeId, DtNodeBoundingInfoPtr> DtNodeBoundingInfoMap;
71 typedef boost::unordered_map<DtNodeId, DtPagedNodeStatusPtr> DtPagedNodeStatusMap;
72 

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)