Skip to content

Commit 034f41a

Browse files
committed
fix agent
1 parent 85e6195 commit 034f41a

File tree

7 files changed

+160
-66
lines changed

7 files changed

+160
-66
lines changed

Library/PAX_SAPIENTICA/Simulation/Agent.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace paxs {
2727
using Environment = paxs::Environment<T>;
2828
using Vector2 = paxs::Vector2<T>;
2929

30-
Agent(const Vector2& pos, const bool gen, const int age, const int life_exp, const Environment* env)
30+
Agent(const Vector2& pos, const bool gen, const int age, const int life_exp, Environment* env)
3131
: position(pos), gender(gen), age(age), life_expectancy(life_exp), environment(env) {}
3232

3333
T getX() const { return position.x; }
@@ -36,8 +36,8 @@ namespace paxs {
3636
void setX(const T& x) { position.x = x; }
3737
void setY(const T& y) { position.y = y; }
3838
void setPosition(const Vector2& pos) { position = pos; }
39-
paxs::Vector2<double> getLocation(const int z, const int pixel_size) const {
40-
return convertToMercatorCoordinate({861, 350}, position, z, pixel_size);
39+
paxs::Vector2<double> getLocation(const paxs::Vector2<int>& start_position, const int z, const int pixel_size) const {
40+
return convertToMercatorCoordinate(start_position, position, z, pixel_size);
4141
}
4242
void move(const Vector2& v) {
4343
if (environment->isLand(position + v)) {
@@ -60,7 +60,7 @@ namespace paxs {
6060
bool gender; // true: male, false: female
6161
int age;
6262
int life_expectancy;
63-
const Environment* environment;
63+
Environment* environment;
6464
};
6565
}
6666

Library/PAX_SAPIENTICA/Simulation/Environment.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ namespace paxs {
3232
public:
3333
using Vector2 = paxs::Vector2<T>;
3434

35-
const int pixel_size = 256;
35+
int pixel_size = 256;
3636
std::map<Vector2, GeographicInformation> geographic_informations;
3737

38+
Environment() = default;
3839
Environment(const std::string& land_file_path, const Vector2& start_position, const Vector2& end_position, const int z) : start_position(start_position), end_position(end_position), z(z) {
3940
loadIsLand(land_file_path);
4041
}

Library/PAX_SAPIENTICA/Simulation/Simulator.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ namespace paxs {
2727
using Vector2 = paxs::Vector2<T>;
2828
using Agent = paxs::Agent<T>;
2929

30+
Simulator() = default;
3031
Simulator(const std::string& land_file_path, const Vector2& start_position, const Vector2& end_position, const int z) :
3132
environment(land_file_path, start_position, end_position, z) {}
3233
void init() {
@@ -61,7 +62,7 @@ namespace paxs {
6162
}
6263
private:
6364
std::vector<Agent> agents;
64-
const Environment environment;
65+
Environment environment;
6566
std::mt19937 gen;
6667
std::uniform_int_distribution<> gender_dist{0, 1};
6768
std::uniform_int_distribution<> life_exp_dist{50, 100};

Library/PAX_SAPIENTICA/Siv3D/LocationPoint.hpp

Lines changed: 75 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ namespace paxs {
2929
location_point_place_name, // 地名
3030
location_point_pit_dwelling, // 集落遺跡
3131
location_point_agent, // エージェント
32+
location_point_agent2, // エージェント
3233
location_point_zempo_koen_fun, // 前方後円墳
3334
location_point_zempo_koho_fun, // 前方後方墳
3435
location_point_hotategai_gata_kofun // 帆立貝型古墳
@@ -45,15 +46,21 @@ namespace paxs {
4546
std::string source{};
4647
};
4748

49+
50+
4851
class PlaceNameLocation {
4952
public:
50-
void update(const std::vector<paxs::Agent<int>>& agents) {
53+
void update(const std::vector<paxs::Agent<int>>& agents, const paxs::Vector2<int>& start_position) {
5154
location_point_list.resize(0);
5255
for (int i = 0; i < agents.size(); ++i) {
5356
location_point_list.emplace_back(
5457
LocationPoint{
55-
"","",agents[i].getLocation(10, 256).x,agents[i].getLocation(10, 256).y,
56-
100,0,0,99999999,LocationPointEnum::location_point_agent,""
58+
"","",agents[i].getLocation(start_position, 10, 256).x,agents[i].getLocation(start_position, 10, 256).y,
59+
100,0,0,99999999,
60+
(agents[i].getGender())?
61+
LocationPointEnum::location_point_agent:
62+
LocationPointEnum::location_point_agent2
63+
,""
5764

5865
}
5966
);
@@ -112,6 +119,16 @@ namespace paxs {
112119
//}
113120
// エージェント
114121
if (lli.lpe == LocationPointEnum::location_point_agent) {
122+
//s3d::Circle( s3d::Vec2{ (lli.x - (map_view_center_x - map_view_width / 2)) / map_view_width * double(s3d::Scene::Width()),
123+
//double(s3d::Scene::Height()) - ((lli.y - (map_view_center_y - map_view_height / 2)) / map_view_height * double(s3d::Scene::Height())) }
124+
//,10).draw();
125+
texture_blue_circle.resized(15).drawAt(
126+
s3d::Vec2{ (lli.x - (map_view_center_x - map_view_width / 2)) / map_view_width * double(s3d::Scene::Width()),
127+
double(s3d::Scene::Height()) - ((lli.y - (map_view_center_y - map_view_height / 2)) / map_view_height * double(s3d::Scene::Height())) });
128+
continue;
129+
}
130+
// エージェント
131+
if (lli.lpe == LocationPointEnum::location_point_agent2) {
115132
//s3d::Circle( s3d::Vec2{ (lli.x - (map_view_center_x - map_view_width / 2)) / map_view_width * double(s3d::Scene::Width()),
116133
//double(s3d::Scene::Height()) - ((lli.y - (map_view_center_y - map_view_height / 2)) / map_view_height * double(s3d::Scene::Height())) }
117134
//,10).draw();
@@ -268,6 +285,61 @@ namespace paxs {
268285
}
269286
}
270287
};
288+
289+
290+
class AgentLocation {
291+
public:
292+
const s3d::Texture texture_blue_circle{ U"./../../../../../Data/MiniIcon/BlueCircle.svg" };
293+
const s3d::Texture texture_red_circle{ U"./../../../../../Data/MiniIcon/RedCircle.svg" };
294+
295+
void draw(const std::vector<paxs::Agent<int>>& agents, const paxs::Vector2<int>& start_position,
296+
const double map_view_width, const double map_view_height, const double map_view_center_x, const double map_view_center_y,
297+
const s3d::Font& font, const s3d::Font& en_font, const s3d::Font& pin_font)const {
298+
299+
// 地名を描画
300+
for (int i = 0; i < agents.size(); ++i) {
301+
const auto lli = LocationPoint{
302+
"","",agents[i].getLocation(start_position, 10, 256).x,agents[i].getLocation(start_position, 10, 256).y,
303+
100,0,0,99999999,
304+
(agents[i].getGender()) ?
305+
LocationPointEnum::location_point_agent :
306+
LocationPointEnum::location_point_agent2
307+
,""
308+
};
309+
// 範囲外を除去
310+
if (lli.x < (map_view_center_x - map_view_width / 1.8)
311+
|| lli.x >(map_view_center_x + map_view_width / 1.8)
312+
|| lli.y < (map_view_center_y - map_view_height / 1.8)
313+
|| lli.y >(map_view_center_y + map_view_height / 1.8)) continue;
314+
315+
// 範囲内の場合
316+
if (lli.min_view > map_view_width
317+
|| lli.max_view < map_view_width
318+
|| lli.min_year > jdn
319+
|| lli.max_year < jdn) {
320+
if (lli.min_year > jdn) continue;
321+
if (lli.max_year < jdn) continue;
322+
323+
// エージェント
324+
if (lli.lpe == LocationPointEnum::location_point_agent) {
325+
texture_blue_circle.resized(15).drawAt(
326+
s3d::Vec2{ (lli.x - (map_view_center_x - map_view_width / 2)) / map_view_width * double(s3d::Scene::Width()),
327+
double(s3d::Scene::Height()) - ((lli.y - (map_view_center_y - map_view_height / 2)) / map_view_height * double(s3d::Scene::Height())) });
328+
continue;
329+
}
330+
// エージェント
331+
if (lli.lpe == LocationPointEnum::location_point_agent2) {
332+
texture_red_circle.resized(15).drawAt(
333+
s3d::Vec2{ (lli.x - (map_view_center_x - map_view_width / 2)) / map_view_width * double(s3d::Scene::Width()),
334+
double(s3d::Scene::Height()) - ((lli.y - (map_view_center_y - map_view_height / 2)) / map_view_height * double(s3d::Scene::Height())) });
335+
continue;
336+
}
337+
}
338+
}
339+
}
340+
341+
};
342+
271343
}
272344

273345
#endif // !PAX_SAPIENTICA_SIV3D_LOCATION_POINT_HPP

Library/PAX_SAPIENTICA/Siv3D/Main.hpp

Lines changed: 68 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include <PAX_SAPIENTICA/Simulation/Simulator.hpp>
2727

2828
// シミュレータを使用する
29-
//#define PAXS_USING_SIMULATOR
29+
#define PAXS_USING_SIMULATOR
3030

3131
namespace paxs {
3232

@@ -40,18 +40,18 @@ namespace paxs {
4040
const std::string path8 = "./../../../../../";
4141

4242
const std::vector<s3d::Font> font_pulldown = {
43-
{16, PAXS_S3D_RESOURCE(U"engine/font/noto-sans-jp/NotoSansJP-Regular.otf") },
44-
{16, PAXS_S3D_RESOURCE(U"engine/font/noto-sans-jp/NotoSansJP-Regular.otf") },
45-
{ 16,(U"engine/font/noto-sans-sc/NotoSansSC-Regular.otf") },
46-
{ 16,(U"engine/font/noto-sans-sc/NotoSansSC-Regular.otf") },
47-
{ 16,(U"engine/font/noto-sans-kr/NotoSansKR-Regular.otf") }
43+
{s3d::FontMethod::SDF, 16, PAXS_S3D_RESOURCE(U"engine/font/noto-sans-jp/NotoSansJP-Regular.otf") },
44+
{s3d::FontMethod::SDF, 16, PAXS_S3D_RESOURCE(U"engine/font/noto-sans-jp/NotoSansJP-Regular.otf") },
45+
{ s3d::FontMethod::SDF, 16,(U"engine/font/noto-sans-sc/NotoSansSC-Regular.otf") },
46+
{ s3d::FontMethod::SDF, 16,(U"engine/font/noto-sans-sc/NotoSansSC-Regular.otf") },
47+
{ s3d::FontMethod::SDF, 16,(U"engine/font/noto-sans-kr/NotoSansKR-Regular.otf") }
4848
};
4949
const std::vector<s3d::Font> font = {
50-
{18, PAXS_S3D_RESOURCE(U"engine/font/noto-sans-jp/NotoSansJP-Regular.otf") },
51-
{18, PAXS_S3D_RESOURCE(U"engine/font/noto-sans-jp/NotoSansJP-Regular.otf") },
52-
{ 18,(U"engine/font/noto-sans-sc/NotoSansSC-Regular.otf") },
53-
{ 18,(U"engine/font/noto-sans-sc/NotoSansSC-Regular.otf") },
54-
{ 18,(U"engine/font/noto-sans-kr/NotoSansKR-Regular.otf") }
50+
{s3d::FontMethod::SDF, 18, PAXS_S3D_RESOURCE(U"engine/font/noto-sans-jp/NotoSansJP-Regular.otf") },
51+
{s3d::FontMethod::SDF, 18, PAXS_S3D_RESOURCE(U"engine/font/noto-sans-jp/NotoSansJP-Regular.otf") },
52+
{ s3d::FontMethod::SDF, 18,(U"engine/font/noto-sans-sc/NotoSansSC-Regular.otf") },
53+
{ s3d::FontMethod::SDF, 18,(U"engine/font/noto-sans-sc/NotoSansSC-Regular.otf") },
54+
{ s3d::FontMethod::SDF, 18,(U"engine/font/noto-sans-kr/NotoSansKR-Regular.otf") }
5555
};
5656
const std::vector<std::vector<s3d::String>> items_pulldown = {
5757
{U"日本語"},{U"English"},{U"繁體中文"},{U"简体中文"},{U"한국어"}
@@ -217,15 +217,16 @@ namespace paxs {
217217
xyz_tile_soil_temperature->setDrawMaxZ(10);
218218
xyz_tile_soil_temperature->setMapFilePath(path + U"Data/Map/XYZTile/Temperature/Image/SoilTemperature/2023/");
219219

220-
const std::unique_ptr<XYZTile> xyz_tile_line(new(std::nothrow) XYZTile(map_view->getWidth(), map_view->getHeight(), map_view->getCenterX(), map_view->getCenterY()));
221-
xyz_tile_line->setDefaultZ(8);
222-
xyz_tile_line->setDrawMinZ(5);
223-
const std::unique_ptr<XYZTile> xyz_tile_line2(new(std::nothrow) XYZTile(map_view->getWidth(), map_view->getHeight(), map_view->getCenterX(), map_view->getCenterY()));
224-
xyz_tile_line2->setDefaultZ(10);
225-
xyz_tile_line2->setDrawMinZ(7);
220+
//const std::unique_ptr<XYZTile> xyz_tile_line(new(std::nothrow) XYZTile(map_view->getWidth(), map_view->getHeight(), map_view->getCenterX(), map_view->getCenterY()));
221+
//xyz_tile_line->setDefaultZ(8);
222+
//xyz_tile_line->setDrawMinZ(5);
223+
//const std::unique_ptr<XYZTile> xyz_tile_line2(new(std::nothrow) XYZTile(map_view->getWidth(), map_view->getHeight(), map_view->getCenterX(), map_view->getCenterY()));
224+
//xyz_tile_line2->setDefaultZ(10);
225+
//xyz_tile_line2->setDrawMinZ(7);
226226
const std::unique_ptr<XYZTile> xyz_tile_line3(new(std::nothrow) XYZTile(map_view->getWidth(), map_view->getHeight(), map_view->getCenterX(), map_view->getCenterY()));
227-
xyz_tile_line3->setDefaultZ(12);
228-
xyz_tile_line3->setDrawMinZ(9);
227+
//xyz_tile_line3->setDefaultZ(12);
228+
//xyz_tile_line3->setDrawMinZ(12);
229+
//xyz_tile_line3->setDrawMaxZ(16);
229230

230231
const s3d::String map_license_name = U"Maptiles by\n農研機構農業環境研究部門, under CC BY 2.1 JP.\n20万分の1シームレス地質図V2.\nOpenStreetMap contributors, under ODbL.";
231232
//const s3d::String map_license_name = U"Maptiles by MIERUNE, under CC BY. Data by OpenStreetMap contributors, under ODbL.\nMaptiles by 農研機構農業環境研究部門, under CC BY 2.1 JP";
@@ -257,7 +258,7 @@ namespace paxs {
257258

258259
#ifdef PAXS_USING_SIMULATOR
259260
// エージェント
260-
std::unique_ptr<PlaceNameLocation> agent_location(new(std::nothrow) PlaceNameLocation);
261+
std::unique_ptr<AgentLocation> agent_location(new(std::nothrow) AgentLocation);
261262
//agent_location->addKofun();
262263
#endif
263264
// 古墳名
@@ -342,11 +343,13 @@ namespace paxs {
342343

343344
bool is_agent_update = true; // エージェントの更新をするか
344345
#ifdef PAXS_USING_SIMULATOR
345-
paxs::Simulator<int> simlator(
346-
path8 + "Data/Map/XYZTile/LandAndWater/Data/BlackAndWhiteBinary/1868/10",
347-
paxs::Vector2<int>{861, 350},
348-
paxs::Vector2<int>{950, 450}, 10);
349-
simlator.init();
346+
paxs::Simulator<int> simlator;
347+
// 対馬のみ
348+
paxs::Vector2<int> start_position = paxs::Vector2<int>{ 879, 406 };
349+
paxs::Vector2<int> end_position = paxs::Vector2<int>{ 881, 409 };
350+
//paxs::Vector2<int> start_position = paxs::Vector2<int>{ 877, 381 };
351+
//paxs::Vector2<int> end_position = paxs::Vector2<int>{ 917, 422 };
352+
//simlator.init();
350353
#endif
351354
//return;
352355
/*##########################################################################################
@@ -411,12 +414,12 @@ namespace paxs {
411414
xyz_tile_river_bw->update(map_view_width, map_view_height, map_view_center_x, map_view_center_y, paxs::XYZTileFileName::Z_Original);
412415
}
413416
//xyz_tile4->update(map_view_width, map_view_height, map_view_center_x, map_view_center_y, paxs::XYZTileFileName::Original);
414-
if (menu_bar.getPulldown(MenuBarType::map).getIsItems(MapType::line1)) {
415-
xyz_tile_line->update(map_view_width, map_view_height, map_view_center_x, map_view_center_y);
416-
}
417-
if (menu_bar.getPulldown(MenuBarType::map).getIsItems(MapType::line2)) {
418-
xyz_tile_line2->update(map_view_width, map_view_height, map_view_center_x, map_view_center_y);
419-
}
417+
//if (menu_bar.getPulldown(MenuBarType::map).getIsItems(MapType::line1)) {
418+
// xyz_tile_line->update(map_view_width, map_view_height, map_view_center_x, map_view_center_y);
419+
//}
420+
//if (menu_bar.getPulldown(MenuBarType::map).getIsItems(MapType::line2)) {
421+
// xyz_tile_line2->update(map_view_width, map_view_height, map_view_center_x, map_view_center_y);
422+
//}
420423
if (menu_bar.getPulldown(MenuBarType::map).getIsItems(MapType::line2)) {
421424
xyz_tile_line3->update(map_view_width, map_view_height, map_view_center_x, map_view_center_y);
422425
}
@@ -460,14 +463,14 @@ namespace paxs {
460463
}
461464
//xyz_tile3->draw(map_view_width, map_view_height, map_view_center_x, map_view_center_y);
462465
//xyz_tile4->draw(map_view_width, map_view_height, map_view_center_x, map_view_center_y);
463-
if (menu_bar.getPulldown(MenuBarType::map).getIsItems(MapType::line1)) {
464-
xyz_tile_line->drawLine(map_view_width, map_view_height, map_view_center_x, map_view_center_y, 0.8, s3d::Color{ 95,99,104 }/*s3d::Palette::Black*/);
465-
}
466-
if (menu_bar.getPulldown(MenuBarType::map).getIsItems(MapType::line2)) {
467-
xyz_tile_line2->drawLine(map_view_width, map_view_height, map_view_center_x, map_view_center_y, 0.4, s3d::Color{ 95,99,104 }/*s3d::Palette::Black*/);
468-
}
466+
//if (menu_bar.getPulldown(MenuBarType::map).getIsItems(MapType::line1)) {
467+
// xyz_tile_line->drawLine(map_view_width, map_view_height, map_view_center_x, map_view_center_y, 0.8, s3d::Color{ 95,99,104 }/*s3d::Palette::Black*/);
468+
//}
469+
//if (menu_bar.getPulldown(MenuBarType::map).getIsItems(MapType::line2)) {
470+
// xyz_tile_line2->drawLine(map_view_width, map_view_height, map_view_center_x, map_view_center_y, 0.4, s3d::Color{ 95,99,104 }/*s3d::Palette::Black*/);
471+
//}
469472
if (menu_bar.getPulldown(MenuBarType::map).getIsItems(MapType::line2)) {
470-
xyz_tile_line3->drawLine(map_view_width, map_view_height, map_view_center_x, map_view_center_y, 0.4, s3d::Color{ 95,99,104 }/*s3d::Palette::Black*/);
473+
xyz_tile_line3->drawLine(map_view_width, map_view_height, map_view_center_x, map_view_center_y, 0.8, s3d::Color{ 95,99,104 }/*s3d::Palette::Black*/);
471474
xyz_tile_line3->drawXYZ(map_view_width, map_view_height, map_view_center_x, map_view_center_y);
472475
}
473476
// 地図上に描画する画像を描画する
@@ -495,19 +498,20 @@ namespace paxs {
495498
if (is_agent_update) {
496499
static int step = 0;
497500
if (step == 0) {
498-
s3d::Print(U"Agent Size:", simlator.getAgents().size());
499-
for (int i = 0; i < 10 && i < simlator.getAgents().size(); ++i) {
500-
s3d::Print(U"Agent[",i,U"]:X" ,simlator.getAgents()[i].getLocation(10,256).x, U", Y", simlator.getAgents()[i].getLocation(10,256).y);
501-
}
501+
//s3d::Print(U"Agent Size:", simlator.getAgents().size());
502+
//for (int i = 0; i < 10 && i < simlator.getAgents().size(); ++i) {
503+
// s3d::Print(U"Agent[",i,U"]:X" ,simlator.getAgents()[i].getLocation(10,256).x, U", Y", simlator.getAgents()[i].getLocation(10,256).y);
504+
//}
502505
}
503-
//++step;
504-
//if (step >= 300) {
506+
++step;
507+
if (step >= 0) {
508+
//if (step >= 30) {
505509
step = 0;
506510
simlator.step();
507-
//}
508-
agent_location->update(simlator.getAgents());
511+
}
509512
}
510-
; agent_location->draw(map_view_width, map_view_height, map_view_center_x, map_view_center_y,
513+
//agent_location->update(simlator.getAgents());
514+
; agent_location->draw(simlator.getAgents(), start_position, map_view_width, map_view_height, map_view_center_x, map_view_center_y,
511515
font[language], font[language]/*en_font*/, pin_font);
512516
#endif
513517
}
@@ -799,13 +803,24 @@ U"II-1",U"II-2",U"II-2/II-3",U"II-3",U"II-4",U"II-5",U"II-6",U"III-1"
799803
).draw(s3d::TextStyle::Outline(0, 0.6, s3d::Palette::White),
800804
s3d::Arg::topRight = s3d::Vec2(s3d::Scene::Width() - 60, 590), s3d::Palette::Black);
801805

806+
#ifdef PAXS_USING_SIMULATOR
807+
if (s3d::SimpleGUI::Button(U"Init", s3d::Vec2{ 10,60 })) {
808+
simlator = paxs::Simulator<int>(
809+
path8 + "Data/Map/XYZTile/LandAndWater/Data/BlackAndWhiteBinary/1868/10",
810+
//paxs::Vector2<int>{861, 350},
811+
//paxs::Vector2<int>{950, 450}, 10);
812+
start_position,
813+
end_position, 10);
814+
simlator.init();
815+
}
816+
if (s3d::SimpleGUI::Button(U"Start", s3d::Vec2{ 110,60 })) {
817+
is_agent_update = true;
818+
}
819+
if (s3d::SimpleGUI::Button(U"Stop", s3d::Vec2{ 210,60 })) {
820+
is_agent_update = false;
821+
}
822+
#endif
802823

803-
//if (s3d::SimpleGUI::Button(U"Start", s3d::Vec2{ 10,60 })) {
804-
// is_agent_update = true;
805-
//}
806-
//if (s3d::SimpleGUI::Button(U"Stop", s3d::Vec2{ 110,60 })) {
807-
// is_agent_update = false;
808-
//}
809824

810825
}
811826
}

Library/PAX_SAPIENTICA/Siv3D/XYZTiles.hpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,17 @@ namespace paxs {
177177
if (magnification_z < draw_min_z) return;
178178
if (magnification_z > draw_max_z) return;
179179

180+
static s3d::Font tmp_font{ s3d::FontMethod::SDF, 16/*, s3d::Typeface::Bold*/};
181+
tmp_font.setBufferThickness(3);
182+
180183
for (int i = start_cell.y, k = 0; i <= end_cell.y; ++i) {
181184
for (int j = start_cell.x; j <= end_cell.x; ++j, ++k) {
182-
static s3d::Font tmp_font{ 16 };
183185
tmp_font(U"X:", j, U"\nY:", i, U"\nZ:", z).draw(
184-
(pos_list[k].x - (map_view_center_x - map_view_width / 2)) / map_view_width * double(s3d::Scene::Width()),
185-
double(s3d::Scene::Height()) - ((pos_list[k].y - (map_view_center_y - map_view_height / 2)) / map_view_height * double(s3d::Scene::Height()))
186-
, s3d::ColorF{ 0, 0, 0 });
186+
s3d::TextStyle::Outline(0, 0.5, s3d::ColorF{ 1, 1, 1 }),
187+
10 + (pos_list[k].x - (map_view_center_x - map_view_width / 2)) / map_view_width * double(s3d::Scene::Width()),
188+
5 + double(s3d::Scene::Height()) - ((pos_list[k].y - (map_view_center_y - map_view_height / 2)) / map_view_height * double(s3d::Scene::Height()))
189+
, s3d::ColorF{ 0, 0, 0 }
190+
);
187191
}
188192
}
189193
}

Library/PAX_SAPIENTICA/Type/Vector2.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ namespace paxs {
2222
template<typename T>
2323
class Vector2 {
2424
public:
25+
Vector2() = default;
2526
Vector2(T x, T y) : x(x), y(y) {}
2627

2728
T x;

0 commit comments

Comments
 (0)