source: Swollen/swollen/watersurface.h @ 31

Last change on this file since 31 was 13, checked in by darran, 20 years ago
  • culling 'c' now loops through CULLNONE, CULLNEARZERO, CULLSTEEPANGLE, CULLALL
  • scaling of datasets now done in swwreader by scaling vertices on load
  • method in watersurface for adjustable zoffset from bedslope
  • need state machine for current mode and adjustment bindings
File size: 840 bytes
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/Material>
18#include <osg/StateAttribute>
19
20
21
22class WaterSurface
23{
24
25public:
26
27    WaterSurface(SWWReader *sww);
28    virtual osg::Geode* get(){ return _node; }
29    virtual void setTimeStep( unsigned int ts );
30    virtual void toggleWireframe();
31    virtual void setOffset( float amount ){ _zoffset = amount; }
32    virtual float getOffset(){ return _zoffset; }
33
34protected:
35
36    SWWReader* _sww;
37    osg::Geode* _node;
38    osg::Geometry* _geom;
39    osg::StateSet* _stateset;
40    osg::Material* _material;
41    virtual ~WaterSurface();
42    float _zoffset;
43
44};
45
46
47#endif  // WATERSURFACE_H
Note: See TracBrowser for help on using the repository browser.