VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtSilverLiningCameraManager.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 <vrvOsg/vrvOsg.h>
13 
15 
16 
17 #include <osg/observer_ptr>
18 #include <osg/Camera>
19 
20 #include <OpenThreads/Mutex>
21 
22 #include <map>
23 #include <atomic>
24 
25 
26 namespace SilverLining
27 {
28  class Camera;
29  class ThreadCameraStreamData;
30  class Atmosphere;
31 }
32 
33 namespace osg
34 {
35  class Camera;
36 }
37 
38 namespace makVrv
39 {
42 
45 
47  template <>
48  inline const char* creatorTypeName<DtSilverLiningCameraManager>(void) { return "DtSilverLiningCameraManagerCreator"; }
49 
51  {
52  public:
55 
57  virtual ~DtSilverLiningCameraManager();
58 
59  protected:
62 
63  private:
65  DtSilverLiningCameraManager() = delete;
69  DtSilverLiningCameraManager& operator=(const DtSilverLiningCameraManager& rhs) = delete;
70 
71  public:
73  virtual SilverLining::ThreadCameraStreamData* getOrCreateSilverLiningTcsData(const osg::Camera* osgCamera, const SilverLining::Atmosphere* atmosphere);
74 
76  virtual SilverLining::ThreadCameraStreamData* findSilverLiningTcsData(const osg::Camera* osgCamera, const SilverLining::Atmosphere* atmosphere);
77 
80  virtual void flushInvalidCameras(SilverLining::Atmosphere* atmosphere, const boost::function<void(SilverLining::ThreadCameraStreamData*)>& callback);
81 
83  virtual void deleteAll(SilverLining::Atmosphere* atmosphere);
84 
86  virtual void deleteCloudLayer(unsigned int layerHandle, SilverLining::Atmosphere* atmosphere);
87 
89  virtual void reloadShaders(SilverLining::Atmosphere* atmosphere, const std::vector<unsigned int>& shaderVector);
90  protected:
92 
93  typedef std::pair< osg::observer_ptr<const osg::Camera>, const SilverLining::Atmosphere* > MapKey;
94 
95  typedef std::map< MapKey, SilverLining::ThreadCameraStreamData*> MapOsgCamerasToTcsDatas;
97 
101 
102  protected:
103 
104  static std::atomic<int> theCameraId;
105  };
106 }
const char * creatorTypeName< DtSilverLiningCameraManager >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtSilverLiningCameraManager.h:48
MapOsgCamerasToTcsDatas myMapOsgCamerasToTcsDatas
Definition: DtSilverLiningCameraManager.h:96
DtDe & myDe
Definition: DtSilverLiningCameraManager.h:91
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
std::map< MapKey, SilverLining::ThreadCameraStreamData * > MapOsgCamerasToTcsDatas
Definition: DtSilverLiningCameraManager.h:95
Definition: DtSilverLiningCameraManager.h:50
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:22
OpenThreads::Mutex myMapMutex
the map can be accessed from cull or draw of the sky/cloud.
Definition: DtSilverLiningCameraManager.h:100
DtVirtualBaseClassCreator< DtSilverLiningCameraManager > DtSilverLiningCameraManagerCreator
creator
Definition: DtSilverLiningCameraManager.h:41
friend DtSilverLiningCameraManagerCreator
only creator can create
Definition: DtSilverLiningCameraManager.h:54
OpenThreads::Mutex Mutex
Definition: DtOsgThreadingUtils.h:12
static std::atomic< int > theCameraId
Definition: DtSilverLiningCameraManager.h:104
std::pair< osg::observer_ptr< const osg::Camera >, const SilverLining::Atmosphere * > MapKey
Definition: DtSilverLiningCameraManager.h:93
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)