VR-Forces 4.3.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 setUp(const osg::Vec3& up) {_up = up;}
66 
68  const osg::Vec3& getUp() const {return _up;}
69 
71  void setOverrideRadius(float r);
72 
74  float getOverrideRadius() const;
75 
77  void setFluidToAir();
78 
80  void setFluidToWater();
81 
83  void operate(osgParticle::Particle* P, double dt);
84 
86  void beginOperate(osgParticle::Program* prg);
87 
88  protected:
91 
92  private:
95  float _density;
96  float _viscosity;
97  float _ovr_rad;
98  osg::Vec3 _wind;
99  osg::Vec3 _up;
100  osgParticle::Program* _current_program;
101  };
102 }
103 
104 #endif
105 

Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)