VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtTritonPlanarReflectionManager.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2023 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvTriton/vrvTriton.h>
15 
17 
19 
20 #include <matrix/vlVector.h>
21 
22 #include <osg/ref_ptr>
23 #include <osg/observer_ptr>
24 #include <osg/Plane>
25 #include <osg/Matrixd>
26 #include <osg/Matrixf>
27 
28 namespace osg
29 {
30  class RenderInfo;
31 }
32 
33 namespace makVrv
34 {
35  class DtDe;
36  class DtTritonDrawable;
37  class DtOsgRenderer;
38  class DtCoordinateConverter;
39 
42 
45 
47  template <>
48  inline const char* creatorTypeName<DtTritonPlanarReflectionManager>(void) { return "DtTritonPlanarReflectionManagerCreator"; }
49 
52  {
53 
54  public:
57 
58  // destructor
60 
61  protected:
64 
65  private:
71  DtTritonPlanarReflectionManager &operator=(const DtTritonPlanarReflectionManager &other) = delete;
72 
73  public:
74 
76  virtual void setPlanarReflectionEnabled(bool enabled);
79 
81  virtual void enableReflection(bool enabled);
82 
84  virtual void removePlanarReflection();
85 
90  virtual DtPlanarReflectionCamera* getOrCreatePlanarReflection(osg::RenderInfo& renderInfo, double seaLevel, bool& isNewReflection);
91 
96  virtual DtPlanarReflectionCamera* planarReflectionCamera();
97 
99  virtual void updateReflectionMatrix(const osg::Vec3& currentPosition, double seaLevel);
100 
102  virtual const osg::Matrixd& reflectionMatrix(void) const;
103 
105  virtual const osg::Plane& reflectionPlane(void) const;
106  protected:
107 
111  virtual DtPlanarReflectionCamera* setupPlanarReflections(osg::RenderInfo &renderInfo, double seaLevel);
112 
114  virtual osg::Node* createReflectionWorldGraph(makVrv::DtOsgRenderer& osgRenderer,
115  const osg::Matrix & localToWorld, const osg::Vec3& currentPos, double seaLevel);
116 
118  virtual void slot_coordinateSystemChanged();
119 
121  virtual void slot_planarReflectionTextureSizeChanged(void);
122 
123  virtual void slot_oceanPlanarReflectionsEnabledChanged();
124 
125  protected:
127 
129 
130  osg::Plane myReflectionPlane;
131  osg::Matrixd myReflectionMatrix;
133 
135 
138  DtCoordinateConverter* myCoordinateConverter = nullptr;
139  };
140 }
friend DtTritonPlanarReflectionManagerCreator
friend class so only the creator can create this class
Definition: DtTritonPlanarReflectionManager.h:56
The DtOsgRenderer is the component responsible for rendering 3D images onto the screen via OpenSceneG...
Definition: DtOsgRenderer.h:91
osg::ref_ptr< DtPlanarReflectionCamera > myPlanarReflectionCamera
Definition: DtTritonPlanarReflectionManager.h:128
DtCoordinateConverter is the base class for &#39;local (cig) to geocentric&#39; converters.
Definition: DtCoordinateConverter.h:25
DtDe & myDe
Definition: DtTritonPlanarReflectionManager.h:126
Definition: featureContext.h:36
osg::Plane myReflectionPlane
Definition: DtTritonPlanarReflectionManager.h:130
osg::Matrixd myReflectionMatrix
Definition: DtTritonPlanarReflectionManager.h:131
A camera for rendering Triton&#39;s planar reflection texture.
Definition: DtPlanarReflectionCamera.h:27
DtSignalConnectionManager myConnections
Definition: DtTritonPlanarReflectionManager.h:134
Declares the DtPlanarReflectionCamera class.
Contains DLL export macros.
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:23
#define DT_DLL_VRVTRITON
Definition: vrvTriton.h:19
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
DtVirtualBaseClassCreator< DtTritonPlanarReflectionManager > DtTritonPlanarReflectionManagerCreator
creator
Definition: DtTritonPlanarReflectionManager.h:41
DtVector myLastGeocentricReference
Definition: DtTritonPlanarReflectionManager.h:132
Base class to provide boost signal/slot management.
const char * creatorTypeName< DtTritonPlanarReflectionManager >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtTritonPlanarReflectionManager.h:48
class for managing the planar reflections used by triton drawable.
Definition: DtTritonPlanarReflectionManager.h:51
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:76

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)