VR-Forces 4.1.1 Class Documentation
DtOsgSkyObject.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2008 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtOsgSkyObject.h,v $ $Revision: 1.14 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #ifndef DtOsgSkyObject_H_
14 #define DtOsgSkyObject_H_
15 
16 #include <vrvOsg/vrvOsg.h>
17 #include <vrvCore/DtSkyObject.h>
19 
21 #include <osg/Camera>
22 #include <osgUtil/CullVisitor>
23 #include <osgParticle/PrecipitationEffect>
24 
25 namespace makVrv
26 {
27  class DtDe;
28 
32  class DT_DLL_VRVOSG DtPrecipitationEffect : public osgParticle::PrecipitationEffect
33  {
34  public:
36  DtPrecipitationEffect(const DtPrecipitationEffect& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
38 
39  virtual const char* libraryName() const { return "vrvOsg"; }
40  virtual const char* className() const { return "DtPrecipitationEffect"; }
41  virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast<const DtPrecipitationEffect*>(obj) != 0; }
42 
43  virtual void traverse(osg::NodeVisitor& nv);
44  };
45 
49  {
50  public:
51 
54 
56  virtual ~DtOsgSkyObject();
57 
62  virtual void setLocation(const DtVector& location);
63 
68  virtual void addCloudLayer(int deckType, const DtVector& location,
69  const DtVector& bounds, double density);
70 
72  virtual void removeCloudLayer(int index);
73 
75  virtual void setCloudLayerEnabled(int index,bool enabled);
76 
78  virtual int cloudLayerCount() const;
79 
81  virtual void setAirTurbidity(float turbidity);
82 
84  virtual void setVisibleDistance(float distance);
85 
87  virtual void setPrecipitationEnabled(bool enabled);
88 
91  virtual void setPrecipitationType(int type);
92 
94  virtual void setPrecipitationIntensity(float intensity);
95 
97  virtual void setCloudLayerPosition(int index, double xCoord,
98  double yCoord);
99 
100  protected:
101 
102  void updatePrecipitation();
103 
105  void on_coordinateSystemChanged(const std::string& type);
106 
107  protected:
109  osg::ref_ptr<DtSilverliningGroup> mySilverliningNode;
110  osg::ref_ptr<osgParticle::PrecipitationEffect> myPrecipitationEffect;
114 
115  };
116 }
117 
118 #endif
119 

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)