VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtStreamingSpeedTreeFeatureCallback.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvSt/vrvSt.h>
13 
15 
17 
18 #include <osg/NodeCallback>
19 #include <osg/ref_ptr>
20 #include <osg/Node>
21 
22 #include <osgEarth/MapNode>
23 #include <vector>
24 
25 namespace makVrv
26 {
27  class DtOsgTerrainPatchObject;
28 
31 
34 
36  template <>
37  inline const char* creatorTypeName<DtStreamingSpeedTreeFeatureCallback>(void) { return "DtStreamingSpeedTreeFeatureCallbackCreator"; }
38 
45  : public osgEarth::VisibleLayerCallback
46  {
47  public:
49 
50  virtual void onVisibleChanged(osgEarth::VisibleLayer* layer) override;
51 
52  protected:
55  };
56 
64  {
65  protected:
66 
69 
72  DtStreamingSpeedTreeForestManager& myForestManager);
73 
76 
77  private:
82 
83  public:
84  // callbacks
85  virtual void onLayerLoaded(const osgEarth::MapNode* mapNode,
86  osgEarth::Layer* layer) override;
87 
90  virtual void onDataPreMerge(const osgEarth::Layer* layer,
91  osg::Node* newNode) override;
92 
94  virtual void onDataLoaded(const osgEarth::Layer* layer,
95  const osg::Node* data) override;
96 
98  virtual const std::string& instanceClassName() const override;
99 
100  public:
101  //Get the class name for this class "speedTreeManager" in this case
102  static const std::string& className();
103 
104  protected:
105  static const std::string theClassName;
106 
107  protected:
111  };
112 }
DtOsgTerrainPatchObject & myPatch
Definition: DtStreamingSpeedTreeFeatureCallback.h:54
DtStreamingSpeedTreeForestManager & myForestManager
Definition: DtStreamingSpeedTreeFeatureCallback.h:108
#define DT_DLL_VRVST
Definition: vrvSt.h:20
DtStreamingSpeedTreeForestManager is a singleton class that manages a collection of DtTerrainPatchObj...
Definition: DtStreamingSpeedTreeForestManager.h:51
static const std::string theClassName
Definition: DtStreamingSpeedTreeFeatureCallback.h:105
DtStreamingSpeedTreeForestManager & myForestManager
Definition: DtStreamingSpeedTreeFeatureCallback.h:53
Contains DLL export macros.
DtVirtualBaseClassCreator< DtStreamingSpeedTreeFeatureCallback, DtOsgTerrainPatchObject &, DtStreamingSpeedTreeForestManager & > DtStreamingSpeedTreeFeatureCallbackCreator
creator
Definition: DtStreamingSpeedTreeFeatureCallback.h:30
friend DtStreamingSpeedTreeFeatureCallbackCreator
creator friend class so it is the only one that can create new DtStreamingSpeedTreeFeatureCallback ...
Definition: DtStreamingSpeedTreeFeatureCallback.h:68
DtOsgTerrainPatchObject & myPatch
Definition: DtStreamingSpeedTreeFeatureCallback.h:109
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:22
A DtOsgTerrainPatchObject contains the methods for loading a file as a terrain. When loading a file a...
Definition: DtOsgTerrainPatchObject.h:51
DtDe & myDe
Definition: DtStreamingSpeedTreeFeatureCallback.h:110
const char * creatorTypeName< DtStreamingSpeedTreeFeatureCallback >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtStreamingSpeedTreeFeatureCallback.h:37
Definition: DtOsgEarthFeatureDataBroker.h:65
DtStreamingSpeedTreeVisibilityCallback is a callback responsible for hiding/showing speedtrees for an...
Definition: DtStreamingSpeedTreeFeatureCallback.h:44
Contains makVrv::DtOsgEarthFeatureDataBroker class.
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:70
DtStreamingSpeedTreeFeatureCallback is a data broker callback that will create speedtrees for an osgE...
Definition: DtStreamingSpeedTreeFeatureCallback.h:62

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)