GaitGeneration by Graph Search
読み取り中…
検索中…
一致する文字列を見つけられません
graphic_main_robot_control.h
[詳解]
1
3
4// Copyright(c) 2023-2025 Design Engineering Laboratory, Saitama University
5// Released under the MIT license
6// https://opensource.org/licenses/mit-license.php
7
8#ifndef DESIGNLAB_GRAPHIC_MAIN_ROBOT_CONTROL_H_
9#define DESIGNLAB_GRAPHIC_MAIN_ROBOT_CONTROL_H_
10
11#include <memory>
12#include <vector>
13
15#include "divided_map_state.h"
17#include "dxlib_gui_updater.h"
20#include "graphic_data_broker.h"
25#include "map_renderer.h"
26#include "map_state.h"
27#include "mouse.h"
28
29
30namespace designlab
31{
32
36{
37public:
39 const std::shared_ptr<GraphicDataBroker>& broker,
40 const std::shared_ptr<const IHexapodCoordinateConverter>& converter_ptr,
41 const std::shared_ptr<const IHexapodJointCalculator>& calculator_ptr,
42 const std::shared_ptr<const IHexapodPostureValidator>& checker_ptr,
43 const std::shared_ptr<const ApplicationSettingRecord>& setting_ptr);
45
46 bool Update() override;
47 void Draw() const override;
48
49private:
50 std::shared_ptr<Mouse> mouse_ptr_;
51
52 DxlibGuiUpdater gui_updater_;
53 DxlibNodeSetterGroup node_setter_group_;
54 Dxlib3dRendererGroup render_group_;
55
56 const std::shared_ptr<const IHexapodCoordinateConverter> converter_ptr_;
57 const std::shared_ptr<const IHexapodJointCalculator> calculator_ptr_;
58
59 std::shared_ptr<DxlibGuiDisplayNodeSwitcher> display_node_switch_gui_;
60 MapState map_state_;
61 DividedMapState divided_map_state_;
62
63 std::vector<RobotStateNode> graph_;
64
65 const std::shared_ptr<GraphicDataBroker> broker_;
66
67 const std::shared_ptr<MapRenderer> map_renderer_;
68
69 int graph_update_count_{ 0 };
70 int map_update_count_{ 0 };
71};
72
73} // namespace designlab
74
75#endif // DESIGNLAB_GRAPHIC_MAIN_ROBOT_CONTROL_H_
マップを格子状に分割して管理するクラス.
dxlib_renderer の draw 関数を呼ぶためのクラス.
クリック判定を行うクラス.
DxLibでノードの設定を行うクラスをまとめるクラス.
ロボットの制御を行うGUIの処理,描画を行うクラス.
void Draw() const override
描画を行う. ここでは描画系の処理のみを行い内部のデータを 更新しないため const を付けている.
bool Update() override
描画画面の更新を行う.純粋仮想関数のため, 継承先では必ず override する必要がある.
GraphicMainのインターフェース.
マップを表すクラス.
Definition map_state.h:32