| 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; |
nothing calls this directly
no test coverage detected