Changeset 111 for Swollen/include
- Timestamp:
- Jun 21, 2005, 2:21:44 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Swollen/include/swwreader.h
r107 r111 71 71 virtual osg::ref_ptr<osg::Vec2Array> getBedslopeTextureCoords(); 72 72 73 virtual bool hasBedslopeTexture() {return (_ bedslopetexture != NULL);}73 virtual bool hasBedslopeTexture() {return (_state.bedslopetexturefilename != NULL);} 74 74 virtual void setBedslopeTexture( std::string filename ); 75 75 virtual osg::Image* getBedslopeTexture(); … … 87 87 virtual unsigned int getNumberOfTimesteps() {return _ntimesteps;} 88 88 89 virtual float getAlphaMin() {return _ alphamin;}90 virtual float getAlphaMax() {return _ alphamax;}91 virtual float getHeightMin() {return _ heightmin;}92 virtual float getHeightMax() {return _ heightmax;}93 virtual float getCullAngle() {return _ cullangle;}89 virtual float getAlphaMin() {return _state.alphamin;} 90 virtual float getAlphaMax() {return _state.alphamax;} 91 virtual float getHeightMin() {return _state.heightmin;} 92 virtual float getHeightMax() {return _state.heightmax;} 93 virtual float getCullAngle() {return _state.cullangle;} 94 94 95 virtual void setAlphaMin( float value ) {_ alphamin = value;}96 virtual void setAlphaMax( float value ) {_ alphamax = value;}97 virtual void setHeightMin( float value ) {_ heightmin = value;}98 virtual void setHeightMax( float value ) {_ heightmax = value;}95 virtual void setAlphaMin( float value ) {_state.alphamin = value;} 96 virtual void setAlphaMax( float value ) {_state.alphamax = value;} 97 virtual void setHeightMin( float value ) {_state.heightmin = value;} 98 virtual void setHeightMax( float value ) {_state.heightmax = value;} 99 99 100 virtual void setCullAngle( float value ) {_cullangle = value;} 101 virtual void toggleCulling() {_culling = _culling ? false : true;} 100 virtual void setCullAngle( float value ) {_state.cullangle = value;} 101 virtual void toggleCulling() {_state.culling = _state.culling ? false : true;} 102 virtual bool getCulling() {return _state.culling;} 103 virtual void setCulling(bool value) {_state.culling = value;} 102 104 103 105 virtual triangle_list getConnectivity(unsigned int index) {return _connectivity.at(index);} 104 106 105 const std::string getSwollenDir() {return * _swollendir;}106 virtual void setSwollenDir(const std::string path) {_s wollendir= new std::string(path);}107 const std::string getSwollenDir() {return *(_state.swollendirectory);} 108 virtual void setSwollenDir(const std::string path) {_state.swollendirectory = new std::string(path);} 107 109 108 110 … … 111 113 virtual ~SWWReader(); 112 114 113 std::string* _filename; 114 std::string* _swollendir; 115 115 116 // state contains all the info needed to serialize 117 struct 118 { 119 float alphamax; // define alpha (transparency) function 120 float alphamin; 121 float heightmax; 122 float heightmin; 123 124 float cullangle; // cull triangles with steepness angle above this value 125 bool culling; // culling is on or off 126 127 std::string* swwfilename; 128 std::string* bedslopetexturefilename; 129 std::string* swollendirectory; 130 131 } _state; 132 133 116 134 // constructor determines SWW validity (netcdf + proper structure) 117 135 bool _valid; … … 147 165 osg::ref_ptr<osg::Vec4Array> _stagecolors; 148 166 149 // optional bedslope texture map150 std::string* _bedslopetexture;151 152 167 // optional geodata for bedslope texture map 153 168 struct … … 179 194 std::vector<triangle_list> _connectivity; 180 195 181 // define alpha (transparency) function182 float _alphamax, _alphamin, _heightmax, _heightmin;183 184 // cull triangles with steepness angle above this value185 float _cullangle;186 bool _culling;187 188 196 }; 189 197
Note: See TracChangeset
for help on using the changeset viewer.