Changeset 116 for Swollen/swollen/watersurface.cpp
- Timestamp:
- Jun 27, 2005, 12:50:42 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Swollen/swollen/watersurface.cpp
r115 r116 41 41 // surface starts on first timestep 42 42 _timestep = 0; 43 _dirty timestep= true; // will force load of watersurface43 _dirtydata = true; // will force load of watersurface 44 44 45 45 // default is filled watersurface … … 47 47 _dirtywireframe = true; // will force wireframe refresh 48 48 49 50 // default is steep culling on 51 _culling = true; 52 _dirtyculling = true; // will force culling ... 49 53 50 54 … … 97 101 { 98 102 _timestep = ts; 99 _dirty timestep= true;103 _dirtydata = true; 100 104 } 101 }102 103 104 void WaterSurface::toggleWireframe()105 {106 setWireframe( _wireframe ? false : true );107 105 } 108 106 … … 117 115 } 118 116 117 void WaterSurface::setCulling(bool value) 118 { 119 if( value != _culling ) 120 { 121 _culling = value; 122 _dirtyculling = true; 123 _dirtydata = true; 124 } 125 } 126 119 127 120 128 void WaterSurface::update() 121 129 { 122 130 123 if( _dirtytimestep ) 131 if( _dirtyculling ) 132 { 133 _sww->setCulling( _culling ); 134 _dirtyculling = false; 135 } 136 137 if( _dirtydata ) 124 138 { 125 139 // delete if exists … … 147 161 // optimize->stripify( *_geom ); 148 162 149 // water surface corresponding to _timestep is now loaded ...150 _dirty timestep= false;163 // water surface corresponding to _timestep is now (re)loaded ... 164 _dirtydata = false; 151 165 } 152 166
Note: See TracChangeset
for help on using the changeset viewer.