VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtDatabasePagerCallback.h
Go to the documentation of this file.
1 /*****************************************************************************
2 * Copyright (c) 2022 MAK Technologies, Inc.
3 * All rights reserved.
4 *****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <osg/DatabaseRequestHandler>
13 
14 #include <string>
15 
16 namespace osg
17 {
18  class PagedLOD;
19  class Node;
20  class Group;
21 }
22 
23 namespace makVrv
24 {
25  class DtDe;
26  class DtTerrainPageSignaler;
27 
29  class DtDatabasePagerCallback : public osg::DatabaseRequestHandlerCallback
30  {
31  public:
34 
36  virtual ~DtDatabasePagerCallback();
37 
38  DtDatabasePagerCallback() = delete;
41  public:
43  virtual osg::DatabaseRequestHandlerCallback* clone() const override;
44 
49  virtual void childLoaded(const osg::DatabaseRequestHandler*, const osg::Group* page, osg::Node* child, const std::string& fileName, osg::Node*& returnedNode) const;
50 
51  /* child under parent was loaded and added to the scenegraph */
52  virtual void childPagedIn(const osg::DatabaseRequestHandler*, osg::PagedLOD* page, osg::Node* child) const;
53 
54  /* child under parent was un-loaded and removed from the scenegraph */
55  virtual void childAboutToPageOut(const osg::DatabaseRequestHandler*, osg::PagedLOD* page, osg::Node* child) const;
56 
57  protected:
60  };
61 }
62 
DtDatabasePagerCallback & operator=(const DtDatabasePagerCallback &rhs)=delete
virtual osg::DatabaseRequestHandlerCallback * clone() const override
osg override
virtual void childPagedIn(const osg::DatabaseRequestHandler *, osg::PagedLOD *page, osg::Node *child) const
virtual ~DtDatabasePagerCallback()
destructor
DtTerrainPageSignaler & myTerrainPageSignaler
Definition: DtDatabasePagerCallback.h:59
It is expected that custom implementations of paging (whether inheriting from pagedLOD or not...
Definition: DtTerrainPageSignaler.h:30
virtual void childAboutToPageOut(const osg::DatabaseRequestHandler *, osg::PagedLOD *page, osg::Node *child) const
simple callback class to pass the database pager signals to a boost signal in the terrain signalar...
Definition: DtDatabasePagerCallback.h:29
DtDe & myDe
Definition: DtDatabasePagerCallback.h:58
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:72
virtual void childLoaded(const osg::DatabaseRequestHandler *, const osg::Group *page, osg::Node *child, const std::string &fileName, osg::Node *&returnedNode) const
Called before a node is added to the live scene graph, possibly from a background pager thread The ch...

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)