GaitGeneration by Graph Search
全て クラス 名前空間 ファイル 関数 変数 型定義 列挙型 列挙値 マクロ定義 ページ Concepts
graphic_main_display_model.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_DISPLAY_MODEL_H_
9#define DESIGNLAB_GRAPHIC_MAIN_DISPLAY_MODEL_H_
10
11#include <memory>
12
14#include "divided_map_state.h"
17#include "dxlib_gui_updater.h"
22#include "keyboard.h"
23#include "map_state.h"
24#include "robot_state_node.h"
25
26
27namespace designlab
28{
29
33{
34public:
36 const std::shared_ptr<const IHexapodCoordinateConverter>& converter_ptr,
37 const std::shared_ptr<const IHexapodJointCalculator>& calculator_ptr,
38 const std::shared_ptr<const IHexapodPostureValidator>& checker_ptr,
39 const std::shared_ptr<const ApplicationSettingRecord>& setting_ptr);
40
42
43 bool Update() override;
44
45 void Draw() const override;
46
47private:
48 void MoveBody();
49
50 void MoveLeg();
51
52 std::shared_ptr<Mouse> mouse_ptr_;
53
54 DxlibGuiUpdater gui_updater_;
55 DxlibNodeSetterGroup node_setter_group_;
56 Dxlib3dRendererGroup render_group_;
57
58 const std::shared_ptr<const IHexapodCoordinateConverter> converter_ptr_;
59 const std::shared_ptr<const IHexapodJointCalculator> calculator_ptr_;
60
61 MapState map_state_;
62 DividedMapState divided_map_state_;
63 RobotStateNode robot_;
64
65 Keyboard keyboard_;
66
68 int divided_map_tile_index_{ 0 };
69};
70
71} // namespace designlab
72
73
74#endif // DESIGNLAB_GRAPHIC_MAIN_DISPLAY_MODEL_H_
マップを格子状に分割して管理するクラス.
dxlib_renderer の draw 関数を呼ぶためのクラス.
クリック判定を行うクラス.
DxLibでノードの設定を行うクラスをまとめるクラス.
ロボットのモデルを表示して,正しく動作しているかを確認するためのクラス.
void Draw() const override
描画を行う. ここでは描画系の処理のみを行い内部のデータを 更新しないため const を付けている.
bool Update() override
描画画面の更新を行う.純粋仮想関数のため, 継承先では必ず override する必要がある.
GraphicMainのインターフェース.
Dxlibのキーボード入力を取得するクラス.
Definition keyboard.h:20
マップを表すクラス.
Definition map_state.h:32
グラフ構造のためのノード(頂点).旧名 LNODE