GaitGeneration by Graph Search
読み取り中…
検索中…
一致する文字列を見つけられません
phantomx_mk2_renderer_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_PHANTOMX_MK2_RENDERER_MODEL_H_
9#define DESIGNLAB_PHANTOMX_MK2_RENDERER_MODEL_H_
10
11#include <array>
12#include <memory>
13
14#include <Dxlib.h>
15
16#include "display_quality.h"
17#include "hexapod_const.h"
22#include "robot_state_node.h"
23
24
25namespace designlab
26{
27
32{
33public:
35 const std::shared_ptr<const IHexapodCoordinateConverter>& converter_ptr,
36 const std::shared_ptr<const IHexapodJointCalculator>& calculator_ptr);
37
38 void SetNode(const RobotStateNode& node) override;
39
40 void Draw() const override;
41
42private:
43 void DrawBody() const;
44
45 void DrawCoxaLink(int leg_index) const;
46
47 void DrawFemurLink(int leg_index) const;
48
49 void DrawTibiaLink(int leg_index) const;
50
51 void DrawJointAxis(int leg_index) const;
52
54 const std::shared_ptr<const IHexapodCoordinateConverter> converter_ptr_;
55
57 const std::shared_ptr<const IHexapodJointCalculator> calculator_ptr_;
58
60 RobotStateNode draw_node_;
61
63 std::array<HexapodJointState, HexapodConst::kLegNum> draw_joint_state_;
64 DisplayQuality display_quality_;
65};
66
67} // namespace designlab
68
69
70#endif // DESIGNLAB_PHANTOMX_MK2_RENDERER_MODEL_H_
DxLibの描画処理を行うクラスのインターフェース.
DxLibのGuiやRendererでノードのセットを行うためのインターフェース.
3Dモデルを使用して PhantomX の描画を行うクラス.
void Draw() const override
描画処理を行う. const 関数にしているのは, 描画処理の中でメンバ変数を変更しないようにするため.
void SetNode(const RobotStateNode &node) override
ノードをセットする.
DisplayQuality
描画の品質設定を示す列挙体.
グラフ構造のためのノード(頂点).旧名 LNODE