VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
boundingVolumeTerrainSourcePager.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
16 
17 
18 
22  : public DtTerrainSourcePager
23 {
24 public:
25 
27 
29 
34  virtual bool pageInGeometry(
35  const DtTerrainPagingGeometryPtr geometry,
36  DtTerrainIntersectIDType intersectId = 0) = 0;
37 
41  virtual bool pageOutNodes(std::list<DtNodeId>& nodesToRemove) = 0;
42 
43  virtual void updatePageTracker(DtTerrainIntersectIDType intersectId = 0) = 0;
44 
45 };
46 
49 {
50 public:
52 
55  bool noValidAreas() const;
56 
57 protected:
59  {
60  public:
61  ScopedBound(DtBoundingVolumeActivePageVisitor& visitor, osg::Node&, bool useMatrix = false);
62  ScopedBound(DtBoundingVolumeActivePageVisitor& visitor, const osg::BoundingSphere&, bool useMatrix = false);
63  ~ScopedBound();
64 
65  private:
67  };
68 
69  friend class ScopedBound;
70 
71  void pushBound(const osg::BoundingSphere&, bool useMatrix=false);
72  void popBound();
73 
75  bool addToPagedOutVolumesList(DtNodeBoundingInfo* pagedOutArea);
76 
77  void addToPagedInVolumesList(osg::Node*, DtNodeBoundingInfoPtr pagedOutArea);
78  void addToPagedInVolumesList(osg::Node*, DtNodeBoundingInfo* pagedOutArea);
79 
80  mutable tbb::spin_rw_mutex myPagedInOutMutex;
84  std::stack<osg::BoundingSphere> myBoundingNodeStack;
86 };
const DtNodeBoundingInfoList & pagedOutBoundingVolumes() const
DtBoost::shared_ptr< DtNodeBoundingInfo > DtNodeBoundingInfoPtr
Definition: boundingNodeInfo.h:85
bool addToPagedOutVolumesList(DtNodeBoundingInfoPtr pagedOutArea)
DtBoost::shared_ptr< DtTerrainPagingGeometry > DtTerrainPagingGeometryPtr
Definition: terrainPagingGeometry.h:46
boost::unordered_map< DtNodeId, DtNodeBoundingInfoPtr > DtNodeBoundingInfoMap
Definition: boundingNodeInfo.h:130
DtTerrainSourcePager is the base class for terrain pagers. There will be one terrainSourcePager per t...
Definition: terrainSourcePager.h:58
Definition: boundingVolumeTerrainSourcePager.h:58
void addToPagedInVolumesList(osg::Node *, DtNodeBoundingInfoPtr pagedOutArea)
DtBoundingVolumeActivePageVisitor * myVisitor
Definition: boundingVolumeTerrainSourcePager.h:66
unsigned long long DtTerrainIntersectIDType
Definition: terrainInterfaceDefines.h:28
Visitor which maintains myMatrix as the current offset matrix though all transform nodes...
Definition: pageInVisitor.h:46
DtNodeBoundingInfoMap myPagedInBoundingMap
Definition: boundingVolumeTerrainSourcePager.h:82
std::list< DtNodeBoundingInfoPtr > DtNodeBoundingInfoList
Definition: boundingNodeInfo.h:128
DtNodeBoundingInfoList myPagedOutBoundingList
Definition: boundingVolumeTerrainSourcePager.h:81
DtBoundingVolumeActivePageVisitor(DtTerrainIntersectIDType intersectId=0)
void pushBound(const osg::BoundingSphere &, bool useMatrix=false)
ScopedBound(DtBoundingVolumeActivePageVisitor &visitor, osg::Node &, bool useMatrix=false)
Visitor class used to find the active paged of a OSG scene graph.
Definition: boundingVolumeTerrainSourcePager.h:48
tbb::spin_rw_mutex myPagedInOutMutex
Definition: boundingVolumeTerrainSourcePager.h:80
DtTerrainIntersectIDType myIntersectId
Definition: boundingVolumeTerrainSourcePager.h:85
DtBoundingVolumeTerrainSourcePager is a derived terrainSourcePager that handles a source such as meta...
Definition: boundingVolumeTerrainSourcePager.h:21
Definition: boundingNodeInfo.h:19
virtual void updatePageTracker(DtTerrainIntersectIDType intersectId=0)=0
bool myNoValidAreas
Definition: boundingVolumeTerrainSourcePager.h:83
#define DT_DLL_vantageTerrainImplementation
This file is used to determine how to build.
Definition: vantageTerrainImplementationDefines.h:28
This class wraps the VR-Vantage Display Engine, and uses as a terrain loader and intersector. This is the terrain engine that powers the DtVantageTerrainImplementation. The DtVantageTerrainEngine runs the DtDe it its own thread, and processes commands thought the command queue.
Definition: vantageTerrainEngine.h:109
std::stack< osg::BoundingSphere > myBoundingNodeStack
Definition: boundingVolumeTerrainSourcePager.h:84
const DtNodeBoundingInfoMap & pagedInBoundingVolumes() const

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)