FillResult.hpp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. //
  2. // FillResult.hpp
  3. // auto_fill_jewel_v3
  4. //
  5. // Created by Red on 2024/11/26.
  6. // 定义填充结果信息
  7. #ifndef FillResult_hpp
  8. #define FillResult_hpp
  9. #include <stdio.h>
  10. #include <vector>
  11. using std::vector;
  12. //一个宝石的填充信息
  13. struct FillResult {
  14. float _x,_y ;// 宝石位置相对盘子左下角(原点)的坐标,盘子内部坐标,注意盘子有效填充区域和盘子精灵尺寸的区别。
  15. // 这里盘子的坐标原点指的是盘子精灵图片尺寸的左下角坐标。
  16. float _rotdeg ;//旋转角度,单位角度
  17. int _jewelTypeId ;//宝石类型ID
  18. float _width; //宝石外接宽度
  19. float _height;//宝石外接高度
  20. } ;
  21. //一个盘子的填充信息,包括它下面的层和宝石
  22. struct PlateFillResult {
  23. PlateFillResult():_plateTypeId(-1),_moveId(0){}
  24. vector< vector<FillResult> > _layersFillResults ;//层与层的宝石填充信息
  25. int _plateTypeId ;//盘子类型ID
  26. int _moveId ;//0-不可移动。 1-第一移动行。 2-第二移动行.
  27. } ;
  28. #endif /* FillResult_hpp */