GaitGeneration by Graph Search
読み取り中…
検索中…
一致する文字列を見つけられません
approximated_motion_range_render.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_APPROXIMATED_MOTION_RANGE_RENDER_H_
9#define DESIGNLAB_APPROXIMATED_MOTION_RANGE_RENDER_H_
10
11#include <memory>
12
17
18
19namespace designlab
20{
21
26 public IDxlib3dRenderer,
27 public IDxlibNodeSetter
28{
29public:
30 ApproximatedMotionRangeRender(const std::shared_ptr<const IHexapodPostureValidator>& validator,
31 const std::shared_ptr<const IHexapodCoordinateConverter>& converter);
33
34 void Draw() const override;
35
36 void SetNode(const RobotStateNode& node) override;
37
38private:
39 enum class PosState
40 {
41 kNotInRange,
42 kInRange,
43 kInRangeDrawable,
44 };
45
46 static constexpr int kDivNum = 300;
47 static constexpr float EdgeLength = 300.f;
48 static constexpr int kLegIndex = 1;
49
50 void InitPosState();
51
52 const std::shared_ptr<const IHexapodPostureValidator> validator_;
53 const std::shared_ptr<const IHexapodCoordinateConverter> converter_;
54
55 PosState pos_state_[kDivNum][kDivNum][kDivNum];
56
57 Vector3 center_;
58
59 RobotStateNode node_;
60};
61
62} // namespace designlab
63
64
65#endif // DESIGNLAB_APPROXIMATED_MOTION_RANGE_RENDER_H_
6脚歩行ロボットの近似された脚の動作範囲を描画するクラス.
void SetNode(const RobotStateNode &node) override
ノードをセットする.
void Draw() const override
描画処理を行う. const 関数にしているのは, 描画処理の中でメンバ変数を変更しないようにするため.
DxLibの描画処理を行うクラスのインターフェース.
DxLibのGuiやRendererでノードのセットを行うためのインターフェース.
グラフ構造のためのノード(頂点).旧名 LNODE
3次元の位置ベクトルを表す構造体.