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 
65  virtual void setColor(const Vector4_32& fogColor, const osg::Camera* osgCamera);
66 
69  virtual void setDensity(float fDensity, const osg::Camera* osgCamera);
70 
73  virtual void setHeightFogPlane(const Vector4_32& fogPlane, const osg::Camera* osgCamera);
74 
81  virtual void setHeightFogParams(const Vector4_32& fogParams, const osg::Camera* osgCamera);
82 
85  virtual void setHeightFogColor(const Vector4_32& color, const osg::Camera* osgCamera);
86 
88  virtual Vector4_32 color(const osg::Camera* osgCamera) const;
89 
91  virtual float density(const osg::Camera* osgCamera) const;
92 
95  virtual void setCameraDepth( float depth, const osg::Camera* osgCamera );
96  virtual float cameraDepth( const osg::Camera* osgCamera ) const;
98 
99  protected:
101  DtLightingComponentShaderConstants* findShaderConstants(const osg::Camera* osgCamera);
103  const DtLightingComponentShaderConstants* findShaderConstants(const osg::Camera* osgCamera) const;
104  protected:
105 
107 
109  };
110 
113 
115  template <>
116  inline const char* creatorTypeName<DtOsgFogComponent>(void) { return "DtOsgFogComponentCreator"; }
117 }
Definition: DtLightingComponentShaderConstants.h:28
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
bool myInstalled
Definition: DtOsgFogComponent.h:106
4 dimensional vector
DtOsgLightManager & myOsgLightManager
Definition: DtOsgFogComponent.h:108
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:55
State component that injects Fog rendering capabilities into a state set.
Definition: DtOsgFogComponent.h:34
DtVirtualBaseClassCreator< DtOsgFogComponent > DtOsgFogComponentCreator
creator
Definition: DtOsgFogComponent.h:112
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:116
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 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)