MCPcopy Create free account
hub / github.com/SoarGroup/Soar / parse

Method parse

Core/SVS/src/commands/set_transform.cpp:85–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83 }
84
85 bool parse()
86 {
87 wme* idwme;
88
89 if (!si->find_child_wme(root, "id", idwme))
90 {
91 set_status("no object id specified");
92 return false;
93 }
94 if (!get_symbol_value(si->get_wme_val(idwme), id))
95 {
96 set_status("object id must be a string");
97 return false;
98 }
99
100 vec3 vec;
101 if (si->get_vec3(root, "position", vec))
102 {
103 props['p'] = vec;
104 }
105 if (si->get_vec3(root, "rotation", vec))
106 {
107 props['r'] = vec;
108 }
109 if (si->get_vec3(root, "scale", vec))
110 {
111 props['s'] = vec;
112 }
113
114 return true;
115 }
116
117 private:
118 Symbol* root;

Callers

nothing calls this directly

Calls 4

get_symbol_valueFunction · 0.85
find_child_wmeMethod · 0.80
get_wme_valMethod · 0.80
get_vec3Method · 0.80

Tested by

no test coverage detected