source: Swollen/swollen/watersurface.h @ 2197

Last change on this file since 2197 was 116, checked in by darran, 19 years ago
  • distro20050627
  • functioning record/playback/save. Can't yet replay from movie.swm
  • image capture not yet implemented.
File size: 1.1 KB
Line 
1
2/*
3    WaterSurface class
4
5    An OpenSceneGraph viewer for pyVolution .sww files.
6    copyright (C) 2004 Geoscience Australia
7*/
8
9
10#ifndef WATERSURFACE_H
11#define WATERSURFACE_H
12
13
14#include <project.h>
15#include <SWWReader.h>
16#include <osg/Geode>
17#include <osg/StateAttribute>
18
19
20class WaterSurface
21{
22
23public:
24
25    WaterSurface(SWWReader *sww);
26    virtual osg::Geode* get(){ return _node; }
27    virtual void setTimeStep( unsigned int ts );
28
29    virtual void setWireframe(bool value);
30    virtual bool getWireframe(){ return _wireframe; };
31    virtual void toggleWireframe(){ setWireframe( _wireframe ? false : true ); };
32
33    virtual void setCulling(bool value);
34    virtual bool getCulling(){ return _culling; };
35    virtual void toggleCulling(){ setCulling( _culling ? false : true ); };
36
37    virtual void update();
38
39protected:
40
41    SWWReader* _sww;
42    osg::Geode* _node;
43    osg::Geometry* _geom;
44    osg::StateSet* _stateset;
45    unsigned int _timestep;
46    virtual ~WaterSurface();
47    bool _wireframe, _dirtywireframe;
48    bool _culling, _dirtyculling;
49    bool _dirtydata;
50};
51
52
53#endif  // WATERSURFACE_H
Note: See TracBrowser for help on using the repository browser.