namespace rrts {
+/*! \brief Use Spatialite (SQLite with GIS) for collision detection.
+ *
+ * The database file `wo.db` is accessed in RAII idiom style -- opened in the
+ * constructor and closed in the destructor. It's not possible to have multiple
+ * instances of `RRTExt19` running (for now.)
+ *
+ * \ingroup ext-col
+ */
+class RRTExt19 : public virtual RRTS {
+private:
+ bool collide_steered();
+public:
+ ~RRTExt19();
+ RRTExt19();
+ Json::Value json() const;
+ void json(Json::Value jvi);
+};
+
/*! \brief Finish when more than 1000 iterations.
*
* \ingroup ext-aux
namespace rrts {
+class P40 : public RRTExt8, public RRTExt10, public RRTExt14, public RRTExt15,
+ public RRTExt16, public RRTExt17, RRTExt19 {
+public:
+ Json::Value json() const
+ {
+ return RRTExt15::json();
+ }
+ void json(Json::Value jvi)
+ {
+ RRTExt19::json(jvi);
+ }
+ void reset()
+ {
+ RRTExt8::reset();
+ RRTExt14::reset();
+ }
+};
+
class P39 : public RRTExt2, public RRTExt8, public RRTExt10, public RRTExt14,
public RRTExt15, public RRTExt16, public RRTExt17,
public RRTExt13 {
--- /dev/null
+#include <cassert>
+#include "rrtext.hh"
+
+namespace rrts {
+
+bool
+RRTExt19::collide_steered()
+{
+ // TODO store this->steered_ to db as multipolygon
+ // TODO request db for collision between steered and obstacles
+}
+
+RRTExt19::~RRTExt19()
+{
+ // TODO close db (file)
+}
+
+RRTExt19::RRTExt19()
+{
+ // TODO open db (file)
+}
+
+RRTExt19::json() const
+{
+ return RRTS::json();
+}
+
+void
+RRTExt19::json(Json::Value jvi)
+{
+ RRTS::json(jvi);
+ assert(jvi["obst"] != Json::nullValue);
+ for (auto& o: jvi["obst"]) {
+ // TODO load polygon (to db?)
+ // TODO create multipolygon in db
+ }
+}
+
+} // namespace rrts