10 template <
typename Self,
typename Finished>
26 return data().getDouble(
"rotation");
34 return data().getBool(
"clip");
38 auto* tagsArray =
data().getArray(
"tags");
39 const bool existedBefore = tagsArray != NULL;
41 tagsArray =
new rbjson::Array;
43 tagsArray->push_back(buildTagObject(t));
53 void setTags(
const std::vector<Tag>& tags) {
54 auto* tagsArray =
new rbjson::Array;
55 for (
const auto& t : tags) {
56 tagsArray->push_back(buildTagObject(t));
63 auto* tagsArray =
new rbjson::Array;
68 rbjson::Object* buildTagObject(
const Tag& t) {
69 auto* tag =
new rbjson::Object;
71 tag->set(
"c00", t.corners[0][0]);
72 tag->set(
"c01", t.corners[0][1]);
73 tag->set(
"c10", t.corners[1][0]);
74 tag->set(
"c11", t.corners[1][1]);
75 tag->set(
"c20", t.corners[2][0]);
76 tag->set(
"c21", t.corners[2][1]);
77 tag->set(
"c30", t.corners[3][0]);
78 tag->set(
"c31", t.corners[3][1]);
void addTag(const Tag &t)
void setRotation(float rotation)
void setTags(const std::vector< Tag > &tags)