質問編集履歴

3

#defineの位置を修正しました

2022/05/27 08:52

投稿

jagaimo0
jagaimo0

スコア33

test CHANGED
File without changes
test CHANGED
@@ -93,11 +93,10 @@
93
93
  #### うまくいっているもの
94
94
  ```T1transition.hpp
95
95
  #ifndef __CLASS__T1
96
+ #define __CLASS__T1
96
97
 
97
98
  #include <vector>
98
99
  #include "../Voronoi/Voronoi.cpp"
99
-
100
- #define __CLASS__T1
101
100
 
102
101
  class T1transition
103
102
  {

2

#defineの位置を変えました。

2022/05/27 08:51

投稿

jagaimo0
jagaimo0

スコア33

test CHANGED
File without changes
test CHANGED
@@ -39,12 +39,11 @@
39
39
 
40
40
  ```Container.hpp
41
41
  #ifndef __CLASS__CONTAINER
42
+ #define __CLASS__CONTAINER
42
43
 
43
44
  #include <vector>
44
45
  #include "../Voronoi/Voronoi.cpp"
45
46
  #include "Wall.cpp"
46
-
47
- #define __CLASS__CONTAINER
48
47
 
49
48
  class Container
50
49
  {

1

セッタの処理内容を修正しました。

2022/05/27 08:25

投稿

jagaimo0
jagaimo0

スコア33

test CHANGED
File without changes
test CHANGED
@@ -69,10 +69,15 @@
69
69
  }
70
70
 
71
71
  // セッタ //
72
- void Container::set(std::vector<Wall> w){
72
+ void Container::set(double x, double y, double w, double h, int size, double mm){
73
+ Wall top = Wall(Point(x,y), Point(x+w,y), size, mm);
73
- for(auto& w_data: w){
74
+ wall.push_back(top);
75
+ Wall right = Wall(Point(x+w,y), Point(x+w,y-h), size, mm);
74
- this -> wall.push_back(w_data);
76
+ wall.push_back(right);
77
+ Wall bottom = Wall(Point(x+w,y-h), Point(x,y-h), size, mm);
78
+ wall.push_back(bottom);
79
+ Wall left = Wall(Point(x,y-h), Point(x,y), size, mm);
75
- }
80
+ wall.push_back(left);
76
81
  }
77
82
  ```
78
83