11 #include <boost/shared_ptr.hpp>
12 #include <boost/unordered_map.hpp>
13 #include <boost/unordered_set.hpp>
14 #include <tbb/spin_mutex.h>
20 : myBoundingSphere(boundingSphere)
21 , myOriginalBoundingSphere(boundingSphere)
22 , myFilename(filename)
51 unsigned int numTriangles,
53 : myBoundingInfo(boundingInfo)
54 , myLastUsed(lastUsed)
55 , myNumTriangles(numTriangles)
56 , myPendingRemoval(false)
67 tbb::spin_mutex::scoped_lock lock(myMutex);
68 if (lastUsed > myLastUsed)
70 myLastUsed = lastUsed;
76 tbb::spin_mutex::scoped_lock lock(myMutex);
91 boost::hash<DtNodeBoundingInfo*> hasher;
92 return hasher(p.get());
DtBoost::shared_ptr< DtNodeBoundingInfo > DtNodeBoundingInfoPtr
Definition: boundingNodeInfo.h:85
DtNodeBoundingInfo(DtSphere boundingSphere, std::string filename, bool known=false)
Definition: boundingNodeInfo.h:19
DtTerrainIntersectIDType lastUsed() const
Definition: boundingNodeInfo.h:74
DtBoost::shared_ptr< DtPagedNodeStatus > DtPagedNodeStatusPtr
Definition: boundingNodeInfo.h:86
boost::unordered_map< DtNodeId, DtNodeBoundingInfoPtr > DtNodeBoundingInfoMap
Definition: boundingNodeInfo.h:97
DtPagedNodeStatus(DtNodeBoundingInfo boundingInfo, unsigned int numTriangles, DtTerrainIntersectIDType lastUsed=0)
Definition: boundingNodeInfo.h:49
const DtSphere myOriginalBoundingSphere
Definition: boundingNodeInfo.h:42
boost::unordered_map< DtNodeId, DtPagedNodeStatusPtr > DtPagedNodeStatusMap
Definition: boundingNodeInfo.h:98
unsigned long long DtTerrainIntersectIDType
Definition: terrainInterfaceDefines.h:28
The DtExtent represents an axis-aligned 3d bounding box.
Definition: extent.h:43
std::list< DtNodeBoundingInfoPtr > DtNodeBoundingInfoList
Definition: boundingNodeInfo.h:95
virtual void expandToInclude(const DtExtent &otherExtent)
Expand extent, if necessary, to include input extent.
bool myPendingRemoval
Definition: boundingNodeInfo.h:63
virtual DtExtent extent() const
Definition: boundingNodeInfo.h:31
DtSphere myBoundingSphere
Definition: boundingNodeInfo.h:41
const unsigned int myNumTriangles
Definition: boundingNodeInfo.h:61
DT_DLL_geometry DtExtent extentOfSphere(const DtSphere &sphere)
const std::string myFilename
Definition: boundingNodeInfo.h:43
DtTerrainIntersectIDType myLastUsed
Definition: boundingNodeInfo.h:82
Stores the status of a paged in bounding volume.
Definition: boundingNodeInfo.h:47
void updateLastUsed(DtTerrainIntersectIDType lastUsed)
Definition: boundingNodeInfo.h:65
Definition: boundingNodeInfo.h:17
std::size_t hash_value(const DtNodeBoundingInfoPtr &p)
needed for boost::unordered
Definition: boundingNodeInfo.h:89
virtual std::string filename() const
Definition: boundingNodeInfo.h:36
#define DT_DLL_vantageTerrainImplementation
This file is used to determine how to build.
Definition: vantageTerrainImplementationDefines.h:28
tbb::spin_mutex myMutex
Definition: boundingNodeInfo.h:81
virtual void expandExtent(DtExtent &ext) const
Definition: boundingNodeInfo.h:26
boost::unordered_set< DtNodeBoundingInfoPtr > DtNodeBoundingInfoSet
Definition: boundingNodeInfo.h:96
const DtNodeBoundingInfo myBoundingInfo
Definition: boundingNodeInfo.h:60