GaitGeneration by Graph Search
読み取り中…
検索中…
一致する文字列を見つけられません
graphic_main_basic.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_BASIC_H_
9#define DESIGNLAB_GRAPHIC_MAIN_BASIC_H_
10
11#include <memory>
12#include <vector>
13
17#include "dxlib_gui_updater.h"
19#include "graphic_const.h"
20#include "graphic_data_broker.h"
26#include "map_state.h"
27#include "map_renderer.h"
29#include "mouse.h"
30#include "robot_state_node.h"
33
34
35namespace designlab
36{
37
41class GraphicMainBasic final : public IGraphicMain
42{
43public:
44 GraphicMainBasic() = delete;
45
47 const std::shared_ptr<const GraphicDataBroker>& broker_ptr,
48 const std::shared_ptr<const IHexapodCoordinateConverter>& converter_ptr,
49 const std::shared_ptr<const IHexapodJointCalculator>& calculator_ptr,
50 const std::shared_ptr<const IHexapodPostureValidator>& checker_ptr,
51 const std::shared_ptr<const ApplicationSettingRecord>& setting_ptr);
52
53 ~GraphicMainBasic() = default;
54
55 bool Update() override;
56
57 void Draw() const override;
58
59private:
60 const int kNodeGetCount;
61
62 const int kInterpolatedAnimeCount;
63
64
65 const std::shared_ptr<const GraphicDataBroker> broker_ptr_;
66
67 std::shared_ptr<Mouse> mouse_ptr_;
68
69 DxlibGuiUpdater gui_updater_;
70 Dxlib3dRendererGroup render_group_;
71 DxlibNodeSetterGroup node_setter_group_;
72
74 std::shared_ptr<DxlibGuiDisplayNodeSwitcher> display_node_switch_gui_;
75
77 MovementLocusRenderer movement_locus_renderer_;
78
80 RobotGroundPointRenderer robot_ground_point_renderer_;
81
83 std::shared_ptr<MapRenderer> map_renderer_ptr_;
84
85 InterpolatedNodeCreator interpolated_node_creator_;
86
87
88 MapState map_state_;
89
90 std::vector<RobotStateNode> graph_;
91
92 size_t display_node_index_{ 0 };
93
94 int counter_{ 0 };
95
96 std::vector<RobotStateNode> interpolated_node_;
97
98 int interpolated_anime_start_count_{ 0 };
99
100
101 int graph_update_count{ 0 };
102 int map_update_count{ 0 };
103};
104
105} // namespace designlab
106
107
108#endif // DESIGNLAB_GRAPHIC_MAIN_BASIC_H_
dxlib_renderer の draw 関数を呼ぶためのクラス.
クリック判定を行うクラス.
DxLibでノードの設定を行うクラスをまとめるクラス.
シミュレーションの一覧表示,ロボットの動きの軌跡の表示 などベーシックな機能を提供するクラス.
bool Update() override
描画画面の更新を行う.純粋仮想関数のため, 継承先では必ず override する必要がある.
void Draw() const override
描画を行う. ここでは描画系の処理のみを行い内部のデータを 更新しないため const を付けている.
GraphicMainのインターフェース.
矩形軌道を生成し,ノード間を補間するクラス.
マップを表すクラス.
Definition map_state.h:32
ロボットの移動軌跡を描画するクラス.
ロボットが接地点した地点の履歴を描画するクラス.