\r
#include "HeatTransfertDevice.h"\r
\r
-HeatTransfert::HeatTransfert() :\r
+HeatTransfert::HeatTransfert(int w, int h) :\r
calibreur(IntervalF(0, 1), IntervalF(0.7, 0)),\r
- devImageHeaters(800, 800),\r
- devImageA(800, 800),\r
- devImageB(800, 800),\r
+ devImageHeaters(w, h),\r
+ devImageA(w, h),\r
+ devImageB(w, h),\r
t(0),\r
dg(8, 8, 1),\r
db(32, 32, 1),\r
\r
void HeatTransfert::setHeaters(HeatImage& image)\r
{\r
+ const float tempCentre = 1.0;\r
+ const float tempCotes = 0.2;\r
+\r
for (int x = 179; x <= 195; x++)\r
{\r
for (int y = 179; y <= 195; y++)\r
- image.set(x, y, 0.2);\r
+ image.set(x, y, tempCotes);\r
for (int y = 605; y <= 621; y++)\r
- image.set(x, y, 0.2);\r
+ image.set(x, y, tempCotes);\r
}\r
\r
for (int x = 605; x <= 621; x++)\r
{\r
for (int y = 179; y <= 195; y++)\r
- image.set(x, y, 0.2);\r
+ image.set(x, y, tempCotes);\r
for (int y = 605; y <= 621; y++)\r
- image.set(x, y, 0.2);\r
+ image.set(x, y, tempCotes);\r
}\r
\r
- image.set(295, 400, 0.2);\r
- image.set(400, 295, 0.2);\r
- image.set(505, 400, 0.2);\r
- image.set(400, 505, 0.2);\r
+ image.set(295, 400, tempCotes);\r
+ image.set(400, 295, tempCotes);\r
+ image.set(505, 400, tempCotes);\r
+ image.set(400, 505, tempCotes);\r
\r
for (int x = 300; x <= 500; x++)\r
for (int y = 300; y <= 500; y++)\r
- image.set(x, y, 1);\r
+ image.set(x, y, tempCentre);\r
}\r