![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /****************************************************************************** 00002 ** Copyright (c) 2008 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 ******************************************************************************/ 00005 /****************************************************************************** 00006 ** $RCSfile: DtSkyDrawable.h,v $ $Revision: 1.15 $ $State: Exp $ 00007 ******************************************************************************/ 00008 00012 00013 #ifndef DtSkyDrawable_H_ 00014 #define DtSkyDrawable_H_ 00015 00016 #include <vrvOsg/vrvOsg.h> 00017 #include <vrvUtil/DtVirtualBaseClass.h> 00018 #include <osg/Drawable> 00019 00020 namespace SilverLining 00021 { 00022 class Atmosphere; 00023 } 00024 00025 namespace makVrv 00026 { 00027 class DtSilverliningGroup; 00028 00031 class DT_DLL_VRVOSG DtSkyDrawable : public osg::Drawable 00032 { 00033 00034 public: 00035 00036 friend class DtSkyDrawableCreator; 00037 00039 DtSkyDrawable(const DtSkyDrawable& copy, const osg::CopyOp& copyop); 00040 00042 virtual ~DtSkyDrawable(); 00043 00044 META_Object(vrvOsg,DtSkyDrawable) 00045 00046 00047 void setGeocentricMode(bool mode); 00048 00050 virtual void drawImplementation(osg::RenderInfo& renderInfo) const; 00051 00054 void setFogBlend(osg::Vec4f rgbA,float density); 00055 00057 const osg::Vec4f& fogColor() const; 00058 00060 float fogDensity() const; 00061 00063 virtual void releaseGLObjects(osg::State* state=0) const; 00064 00066 void setSkyBoxSize(double size); 00067 00068 protected: 00069 00071 DtSkyDrawable(DtSilverliningGroup* parent = 0); 00072 00073 protected: 00074 00075 DtSilverliningGroup* myParent; 00076 bool myGeocentricFlag; 00077 osg::Vec4f myFogColor; 00078 float myFogDensity; 00079 double myBoxSize; 00080 }; 00081 00084 class DT_DLL_VRVOSG DtSkyDrawableCreator : public DtVirtualBaseClass 00085 { 00086 public: 00087 00090 static DtSkyDrawableCreator& instance(DtDe& de); 00091 00093 static void registerInstance(DtDe& de, DtSkyDrawableCreator* anInstance); 00094 00096 virtual DtSkyDrawable* create(DtSilverliningGroup* parent); 00097 }; 00098 00099 } 00100 00101 #endif