5#include "webcface/common/webcface-config.h"
13template <
typename Component>
27 std::shared_ptr<internal::DataSetBuffer<RobotLink>> sb;
39 using Field::lastName;
40 using Field::lastNameW;
77 return child(std::to_string(index));
99 template <
typename F,
typename std::enable_if_t<std::is_invocable_v<F>,
100 std::
nullptr_t> =
nullptr>
103 [callback = std::move(callback)](
const auto &) { callback(); });
120 template <
typename T>
122 *this << std::forward<T>(rl);
135 const RobotModel &set(
const std::vector<RobotLink> &v)
const;
154 std::optional<std::vector<RobotLink>> tryGet()
const;
159 std::vector<RobotLink>
get()
const {
160 return tryGet().value_or(std::vector<RobotLink>{});
162 operator std::vector<RobotLink>()
const {
return get(); }
189 return toComponent3D().
origin(origin);
196 return toComponent3D().
color(color);
202 template <
typename... Args>
204 return toComponent3D().
angles(std::forward<Args>(args)...);
211 template <
typename T,
212 typename std::enable_if_t<std::is_same_v<T, RobotModel>,
213 std::nullptr_t> =
nullptr>
215 return static_cast<Field>(*this) ==
static_cast<Field>(other);
217 template <
typename T,
218 typename std::enable_if_t<std::is_same_v<T, RobotModel>,
219 std::nullptr_t> =
nullptr>
221 return static_cast<Field>(*this) !=
static_cast<Field>(other);
Canvas3Dの送受信データを表すクラス
Definition canvas3d.h:28
リンク1つを表すクラス
Definition robot_link.h:190
RobotModelの送受信データを表すクラス
Definition robot_model.h:26
bool operator==(const T &other) const
RobotModelの参照先を比較
Definition robot_model.h:214
RobotModel operator[](StringInitializer field) const
Definition robot_model.h:69
RobotModel child(int index) const
Definition robot_model.h:59
RobotModel operator[](int index) const
Definition robot_model.h:76
TemporalCanvas3DComponent origin(const Transform &origin) const
Canvas3DComponentに変換 + 要素の移動
Definition robot_model.h:188
const RobotModel & onChange(F callback) const
値が変化したときに呼び出されるコールバックを設定
Definition robot_model.h:101
bool operator!=(const T &other) const
Definition robot_model.h:220
const RobotModel & operator=(const std::vector< RobotLink > &v) const
モデルをセットする
Definition robot_model.h:140
RobotModel child(StringInitializer field) const
「(thisの名前).(追加の名前)」を新しい名前とするField
Definition robot_model.h:51
TemporalCanvas3DComponent angles(Args &&...args) const
Canvas3DComponentに変換 + RobotModelの関節を設定
Definition robot_model.h:203
RobotModel(const Field &base, const SharedString &field)
Definition robot_model.h:32
RobotModel parent() const
nameの最後のピリオドの前までを新しい名前とするField
Definition robot_model.h:83
TemporalCanvas3DComponent color(ViewColor color) const
Canvas3DComponentに変換 + 色の指定
Definition robot_model.h:195
const RobotModel & add(T &&rl) const
モデルにlinkを追加
Definition robot_model.h:121
std::vector< RobotLink > get() const
モデルを返す
Definition robot_model.h:159
u8stringとstringとwstringをshared_ptrで持ち共有する
Definition encoding.h:170
SharedString のpublicなコンストラクタインタフェース (入力専用)
Definition encoding.h:235
Canvas3Dを構築するときに使う一時的なCanvas3DComponent.
Definition component_canvas3d.h:121
TemporalCanvas3DComponent & color(ViewColor color) &
色
Definition component_canvas3d.cc:97
TemporalCanvas3DComponent & origin(const Transform &origin) &
要素の移動
Definition component_canvas3d.cc:88
TemporalCanvas3DComponent & angles(const std::map< std::string, double, std::less<> > &angles) &
RobotModelの関節をまとめて設定
Definition component_canvas3d.cc:138
View,Canvasなどで送信用にaddされたデータを管理する
Definition data_buffer.h:17
std::ostream & operator<<(std::ostream &os, const Arg &arg)
Definition func_info.cc:99
ViewColor
Definition component_view.h:41
const auto & get(const AxisAngle &aa)
Definition transform.h:227
ClientDataの参照とメンバ名とデータ名を持つクラス
Definition field.h:68
Field parent() const
nameの最後のピリオドの前までを新しい名前とするField
Definition field.cc:39
Field child(const SharedString &field) const
Definition field.cc:48
#define WEBCFACE_DLL
Definition webcface-config.h:69
#define WEBCFACE_NS_END
Definition webcface-config.h:113
#define WEBCFACE_NS_BEGIN
Definition webcface-config.h:112
#define WEBCFACE_CALL_FP
Definition webcface-config.h:107