}
return RRTS::path();
}
+
+Json::Value RRTExt3::json()
+{
+ Json::Value jvo = RRTS::json();
+ jvo["orig_path_cost"] = this->orig_path_cost();
+ {
+ unsigned int cu = 0;
+ unsigned int co = 0;
+ unsigned int pcnt = 0;
+ for (auto n: this->path()) {
+ jvo["orig_path"][pcnt][0] = n->x();
+ jvo["orig_path"][pcnt][1] = n->y();
+ jvo["orig_path"][pcnt][2] = n->h();
+ if (n->t(RRTNodeType::cusp))
+ cu++;
+ if (n->t(RRTNodeType::connected))
+ co++;
+ pcnt++;
+ }
+ jvo["orig_cusps-in-path"] = cu;
+ jvo["orig_connecteds-in-path"] = co;
+ }
+ return jvo;
+}
+
+void RRTExt3::json(Json::Value jvi)
+{
+ return RRTS::json(jvi);
+}