11 #include <boost/shared_ptr.hpp>
12 #include <boost/unordered_map.hpp>
13 #include <boost/unordered_set.hpp>
14 #include <tbb/spin_mutex.h>
22 : myBoundingSphere(boundingSphere)
23 , myOriginalBoundingSphere(boundingSphere)
24 , myFilename(filename)
53 unsigned int numTriangles,
55 : myBoundingInfo(boundingInfo)
56 , myLastUsed(lastUsed)
57 , myNumTriangles(numTriangles)
58 , myPendingRemoval(false)
69 tbb::spin_mutex::scoped_lock lock(myMutex);
70 if (lastUsed > myLastUsed)
72 myLastUsed = lastUsed;
78 tbb::spin_mutex::scoped_lock lock(myMutex);
93 boost::hash<DtNodeBoundingInfo*> hasher;
94 return hasher(p.get());
100 myNodeBoundingInfoPtr(nodeBoundingInfoPtr),
105 myNodeBoundingInfoPtr(rh.myNodeBoundingInfoPtr),
106 myMatrix(rh.myMatrix)
DtBoost::shared_ptr< DtNodeBoundingInfo > DtNodeBoundingInfoPtr
Definition: boundingNodeInfo.h:87
boost::unordered_map< DtNodeId, DtPagedInExtendInfo > DtNodeBoundingExtendedInfoMap
Definition: boundingNodeInfo.h:133
DtNodeBoundingInfo(DtSphere boundingSphere, std::string filename, bool known=false)
Definition: boundingNodeInfo.h:21
DtTerrainIntersectIDType lastUsed() const
Definition: boundingNodeInfo.h:76
DtBoost::shared_ptr< DtPagedNodeStatus > DtPagedNodeStatusPtr
Definition: boundingNodeInfo.h:88
boost::unordered_map< DtNodeId, DtNodeBoundingInfoPtr > DtNodeBoundingInfoMap
Definition: boundingNodeInfo.h:132
DtPagedNodeStatus(DtNodeBoundingInfo boundingInfo, unsigned int numTriangles, DtTerrainIntersectIDType lastUsed=0)
Definition: boundingNodeInfo.h:51
Definition: boundingNodeInfo.h:97
const DtSphere myOriginalBoundingSphere
Definition: boundingNodeInfo.h:44
boost::unordered_map< DtNodeId, DtPagedNodeStatusPtr > DtPagedNodeStatusMap
Definition: boundingNodeInfo.h:134
The DtExtent represents an axis-aligned 3d bounding box.
Definition: extent.h:43
std::list< DtNodeBoundingInfoPtr > DtNodeBoundingInfoList
Definition: boundingNodeInfo.h:130
virtual void expandToInclude(const DtExtent &otherExtent)
Expand extent, if necessary, to include input extent.
bool myPendingRemoval
Definition: boundingNodeInfo.h:65
virtual DtExtent extent() const
Definition: boundingNodeInfo.h:33
std::vector< size_t > myNbTriangles
triangles by drawable
Definition: boundingNodeInfo.h:127
DtSphere myBoundingSphere
Definition: boundingNodeInfo.h:43
const unsigned int myNumTriangles
Definition: boundingNodeInfo.h:63
DT_DLL_geometry DtExtent extentOfSphere(const DtSphere &sphere)
const std::string myFilename
Definition: boundingNodeInfo.h:45
DtTerrainIntersectIDType myLastUsed
Definition: boundingNodeInfo.h:84
std::vector< size_t > myAssociatedDrawableId
Definition: boundingNodeInfo.h:125
DtNodeBoundingInfoPtr myNodeBoundingInfoPtr
Definition: boundingNodeInfo.h:122
Stores the status of a paged in bounding volume.
Definition: boundingNodeInfo.h:49
void updateLastUsed(DtTerrainIntersectIDType lastUsed)
Definition: boundingNodeInfo.h:67
DtPagedInExtendInfo(const DtPagedInExtendInfo &rh)
Definition: boundingNodeInfo.h:104
Definition: boundingNodeInfo.h:19
std::size_t hash_value(const DtNodeBoundingInfoPtr &p)
needed for boost::unordered
Definition: boundingNodeInfo.h:91
std::vector< DtNodeId > myAssociatedDrawable
Definition: boundingNodeInfo.h:124
osg::Matrix myMatrix
Definition: boundingNodeInfo.h:123
DtPagedInExtendInfo(const DtNodeBoundingInfoPtr &nodeBoundingInfoPtr, const osg::Matrix &matrix)
Definition: boundingNodeInfo.h:99
virtual std::string filename() const
Definition: boundingNodeInfo.h:38
#define DT_DLL_vantageTerrainImplementation
This file is used to determine how to build.
Definition: vantageTerrainImplementationDefines.h:28
tbb::spin_mutex myMutex
Definition: boundingNodeInfo.h:83
virtual void expandExtent(DtExtent &ext) const
Definition: boundingNodeInfo.h:28
DtPagedInExtendInfo()
Definition: boundingNodeInfo.h:117
boost::unordered_set< DtNodeBoundingInfoPtr > DtNodeBoundingInfoSet
Definition: boundingNodeInfo.h:131
const DtNodeBoundingInfo myBoundingInfo
Definition: boundingNodeInfo.h:62