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) 2025 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 DtOsgCullVisitor;
37  class DtTritonDrawable;
38  class DtOsgRenderer;
39  class DtCoordinateConverter;
40 
43 
46 
48  template <>
49  inline const char* creatorTypeName<DtTritonPlanarReflectionManager>(void) { return "DtTritonPlanarReflectionManagerCreator"; }
50 
53  {
54 
55  public:
58 
59  // destructor
61 
62  protected:
65 
66  private:
72  DtTritonPlanarReflectionManager &operator=(const DtTritonPlanarReflectionManager &other) = delete;
73 
74  public:
75 
77  virtual void setPlanarReflectionEnabled(bool enabled);
80 
82  virtual void enableReflection(bool enabled);
83 
85  virtual void removePlanarReflection();
86 
93  virtual DtPlanarReflectionCamera* getOrCreatePlanarReflection(osg::RenderInfo& renderInfo, double seaLevel, bool& isNewReflection);
94 
99  virtual DtPlanarReflectionCamera* planarReflectionCamera();
100 
102  virtual void updateReflectionMatrix(const osg::Vec3& currentPosition, double seaLevel);
103 
105  virtual const osg::Matrixd& reflectionMatrix(void) const;
106 
108  virtual const osg::Plane& reflectionPlane(void) const;
109  protected:
110 
114  virtual DtPlanarReflectionCamera* setupPlanarReflections(osg::RenderInfo &renderInfo, double seaLevel);
115 
117  virtual osg::Node* createReflectionWorldGraph(makVrv::DtOsgRenderer& osgRenderer,
118  const osg::Matrix & localToWorld, const osg::Vec3& currentPos, double seaLevel);
119 
121  virtual void slot_coordinateSystemChanged();
122 
124  virtual void slot_planarReflectionTextureSizeChanged(void);
125 
126  virtual void slot_oceanPlanarReflectionsEnabledChanged();
127 
129  virtual void slot_preCull(DtOsgCullVisitor* cullVisitor);
130 
131  protected:
133 
135 
136  osg::Plane myReflectionPlane;
137  osg::Matrixd myReflectionMatrix;
139 
141 
144  DtCoordinateConverter* myCoordinateConverter = nullptr;
145  };
146 }
friend DtTritonPlanarReflectionManagerCreator
friend class so only the creator can create this class
Definition: DtTritonPlanarReflectionManager.h:57
The DtOsgRenderer is the component responsible for rendering 3D images onto the screen via OpenSceneG...
Definition: DtOsgRenderer.h:92
osg::ref_ptr< DtPlanarReflectionCamera > myPlanarReflectionCamera
Definition: DtTritonPlanarReflectionManager.h:134
DtCoordinateConverter is the base class for &#39;local (cig) to geocentric&#39; converters.
Definition: DtCoordinateConverter.h:25
DtDe & myDe
Definition: DtTritonPlanarReflectionManager.h:132
Definition: featureContext.h:36
osg::Plane myReflectionPlane
Definition: DtTritonPlanarReflectionManager.h:136
osg::Matrixd myReflectionMatrix
Definition: DtTritonPlanarReflectionManager.h:137
A camera for rendering Triton&#39;s planar reflection texture.
Definition: DtPlanarReflectionCamera.h:27
DtSignalConnectionManager myConnections
Definition: DtTritonPlanarReflectionManager.h:140
Declares the DtPlanarReflectionCamera class.
Contains DLL export macros.
DtOsgCullVisitor will inspect the camera to see which visual mode is active. If the visual mode is a ...
Definition: DtOsgCullVisitor.h:27
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:42
DtVector myLastGeocentricReference
Definition: DtTritonPlanarReflectionManager.h:138
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:49
class for managing the planar reflections used by triton drawable.
Definition: DtTritonPlanarReflectionManager.h:52
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 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)