VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtOsgFogComponent.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 
15 
16 #include <vrvMath/DtVector4.h>
17 
18 namespace osg
19 {
20  class Fog;
21  class StateSet;
22  class Camera;
23 }
24 
25 namespace makVrv
26 {
27  class DtOsgLightManager;
28  class DtLightingComponentShaderConstants;
29 
35  {
36  public:
37 
40 
42  virtual ~DtOsgFogComponent();
43 
44  private:
45 
48 
50  DtOsgFogComponent &operator=(const DtOsgFogComponent &other);
51 
52  public:
53 
55  virtual bool install(osg::StateSet* stateset);
56 
58  virtual bool uninstall(osg::StateSet* stateset);
59 
61  virtual bool installed(void) const;
62 
66  virtual void setColor(const Vector4_32& fogColor, const osg::Camera* osgCamera);
67 
71  virtual void setDensity(float fDensity, const osg::Camera* osgCamera);
72 
76  virtual void setHeightFogPlane(const Vector4_32& fogPlane, const osg::Camera* osgCamera);
77 
85  virtual void setHeightFogParams(const Vector4_32& fogParams, const osg::Camera* osgCamera);
86 
90  virtual void setHeightFogColor(const Vector4_32& color, const osg::Camera* osgCamera);
91 
93  virtual Vector4_32 color(const osg::Camera* osgCamera) const;
94 
96  virtual float density(const osg::Camera* osgCamera) const;
97 
100  virtual void setCameraDepth( float depth, const osg::Camera* osgCamera );
101  virtual float cameraDepth( const osg::Camera* osgCamera ) const;
103 
104  protected:
106  DtLightingComponentShaderConstants* findShaderConstants(const osg::Camera* osgCamera);
108  const DtLightingComponentShaderConstants* findShaderConstants(const osg::Camera* osgCamera) const;
109  protected:
110 
112 
114  };
115 
118 
120  template <>
121  inline const char* creatorTypeName<DtOsgFogComponent>(void) { return "DtOsgFogComponentCreator"; }
122 }
Definition: DtLightingComponentShaderConstants.h:28
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
bool myInstalled
Definition: DtOsgFogComponent.h:111
4 dimensional vector
DtOsgLightManager & myOsgLightManager
Definition: DtOsgFogComponent.h:113
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:23
Contains makVrv::DtVirtualBaseClass class.
DtOsgLightManager receives LightSource nodes from the DtOsgCullVisitor, and collects them all here wh...
Definition: DtOsgLightManager.h:54
State component that injects Fog rendering capabilities into a state set.
Definition: DtOsgFogComponent.h:34
DtVirtualBaseClassCreator< DtOsgFogComponent > DtOsgFogComponentCreator
creator
Definition: DtOsgFogComponent.h:117
Base class for components that affect the state on a subset of the scene graph, injecting state...
Definition: DtOsgStateComponent.h:34
const char * creatorTypeName< DtOsgFogComponent >(void)
template specialization for the creator
Definition: DtOsgFogComponent.h:121
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
Contains makVrv::DtOsgStateComponent class.

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)