@NewLodClass.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /******************************************************************************/
  2. /******************************************************************************/
  3. class NewLodClass : ClosableWindow
  4. {
  5. bool preview, simplified_valid, processed_ready, keep_border, draw_at_distance, finished, stop;
  6. flt intensity, max_distance, max_uv, max_color, max_material, max_skin, max_normal, draw_distance, scale;
  7. uint src_id, simplified_src_id, change_id, simplified_change_id;
  8. Property *quality, *preview_prop, *draw_at_distance_prop;
  9. Memx<Property> props;
  10. TextBlack ts;
  11. Button ok, from_file;
  12. WindowIO win_io;
  13. MeshLod src, processed, simplified;
  14. Thread thread;
  15. SyncLock lock;
  16. static flt NextLodDist(flt dist); // make next LOD distance 2x bigger, and at least at 2 meters away
  17. static void FromFile(NewLodClass &nl);
  18. static void PreviewToggle(NewLodClass &nl);
  19. static void DrawAtDistToggle(NewLodClass &nl);
  20. static void OK(NewLodClass &nl);
  21. static void ChangedParams(C Property &prop);
  22. void changedParams();
  23. static void Import (C Str &name, ptr=null);
  24. static void ImportEx(C Str &name, int lod_index);
  25. bool needRebuild()C;
  26. static bool Simplify(Thread &thread);
  27. bool simplify();
  28. void startThread();
  29. void createSrc();
  30. NewLodClass& activate()override;
  31. virtual NewLodClass& hide ()override;
  32. ~NewLodClass(); // delete thread before other members
  33. NewLodClass& del ()override;
  34. NewLodClass& create();
  35. virtual void update(C GuiPC &gpc)override;
  36. public:
  37. NewLodClass();
  38. };
  39. /******************************************************************************/
  40. /******************************************************************************/
  41. extern NewLodClass NewLod;
  42. /******************************************************************************/