VR-Forces 4.1 Class Documentation
DtOsgFluidFrictionOperator.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2008 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtOsgFluidFrictionOperator.h,v $ $Revision: 1.7 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #ifndef DtOsgFluidFrictionOperator_H_
14 #define DtOsgFluidFrictionOperator_H_
15 
16 #include <vrvOsg/vrvOsg.h>
17 
18 #include <osgParticle/Operator>
19 #include <osgParticle/FluidFrictionOperator>
20 #include <osgParticle/Particle>
21 #include <osgParticle/Program>
22 
23 namespace makVrv
24 {
29  class DT_DLL_VRVOSG DtOsgFluidFrictionOperator : public osgParticle::Operator
30  {
31  public:
32 
35 
38  const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
39 
41  static DtOsgFluidFrictionOperator* fromOsgFluidFrictionOperator(
42  osgParticle::FluidFrictionOperator* osgOp);
43 
44  META_Object(makVrv, DtOsgFluidFrictionOperator);
45 
47  void setFluidDensity(float d);
48 
50  float getFluidDensity() const;
51 
53  void setFluidViscosity(float v);
54 
56  float getFluidViscosity() const;
57 
59  void setWind(const osg::Vec3& wind) { _wind = wind; }
60 
62  const osg::Vec3& getWind() const { return _wind; }
63 
65  void setOverrideRadius(float r);
66 
68  float getOverrideRadius() const;
69 
71  void setFluidToAir();
72 
74  void setFluidToWater();
75 
77  void operate(osgParticle::Particle* P, double dt);
78 
80  void beginOperate(osgParticle::Program* prg);
81 
82  protected:
85 
86  private:
89  float _density;
90  float _viscosity;
91  float _ovr_rad;
92  osg::Vec3 _wind;
93  osgParticle::Program* _current_program;
94  };
95 }
96 
97 #endif
98 

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)