@LakeBase.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /******************************************************************************/
  2. /******************************************************************************
  3. Lake and River can be saved on MainThread and loaded on BuilderThread.
  4. Use 'WorldAreaSync' for that.
  5. /******************************************************************************/
  6. class LakeBase
  7. {
  8. bool removed;
  9. flt depth, tex_scale;
  10. UID material;
  11. Memc<Memc<Vec> > polys;
  12. TimeStamp removed_time, depth_time, tex_scale_time, material_time, polys_time;
  13. // get
  14. bool equal(C LakeBase &src)C;
  15. bool newer(C LakeBase &src)C;
  16. bool getRect(Rect &rect)C;
  17. uint memUsage()C;
  18. // operations
  19. void setDepth(flt depth);
  20. bool sync(C LakeBase &src);
  21. bool undo(C LakeBase &src);
  22. // draw
  23. void draw(C Color &color, C Color &depth_color=TRANSPARENT)C;
  24. // io
  25. bool save(File &f)C;
  26. bool load(File &f);
  27. bool load(C Str &name);
  28. public:
  29. LakeBase();
  30. };
  31. /******************************************************************************/
  32. /******************************************************************************/
  33. /******************************************************************************/