Ignore:
Timestamp:
Jun 27, 2005, 12:50:42 AM (19 years ago)
Author:
darran
Message:
  • distro20050627
  • functioning record/playback/save. Can't yet replay from movie.swm
  • image capture not yet implemented.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Swollen/swollen/watersurface.cpp

    r115 r116  
    4141   // surface starts on first timestep
    4242   _timestep = 0;
    43    _dirtytimestep = true;  // will force load of watersurface
     43   _dirtydata = true;  // will force load of watersurface
    4444
    4545   // default is filled watersurface
     
    4747   _dirtywireframe = true;  // will force wireframe refresh
    4848
     49
     50   // default is steep culling on
     51   _culling = true;
     52   _dirtyculling = true;  // will force culling ...
    4953
    5054
     
    97101   {
    98102      _timestep = ts;
    99       _dirtytimestep = true;
     103      _dirtydata = true;
    100104   }
    101 }
    102 
    103 
    104 void WaterSurface::toggleWireframe()
    105 {
    106    setWireframe( _wireframe ? false : true );
    107105}
    108106
     
    117115}
    118116
     117void WaterSurface::setCulling(bool value)
     118{
     119   if( value != _culling )
     120   {
     121      _culling = value;
     122      _dirtyculling = true;
     123      _dirtydata = true;
     124   }
     125}
     126
    119127
    120128void WaterSurface::update()
    121129{
    122130
    123    if( _dirtytimestep )
     131   if( _dirtyculling )
     132   {
     133      _sww->setCulling( _culling );
     134      _dirtyculling = false;
     135   }
     136
     137   if( _dirtydata )
    124138   {
    125139      // delete if exists
     
    147161      // optimize->stripify( *_geom );
    148162
    149       // water surface corresponding to _timestep is now loaded ...
    150       _dirtytimestep = false;
     163      // water surface corresponding to _timestep is now (re)loaded ...
     164      _dirtydata = false;
    151165   }
    152166
Note: See TracChangeset for help on using the changeset viewer.