-#include "rrtext.h"
+#include "rrtext.hh"
#include "reeds_shepp.h"
-double RRTExt6::cost_build(RRTNode &f, RRTNode &t)
+namespace rrts {
+
+double
+RRTExt6::cost_build(RRTNode const& f, RRTNode const& t) const
{
double q0[] = {f.x(), f.y(), f.h()};
double q1[] = {t.x(), t.y(), t.h()};
- ReedsSheppStateSpace rsss(this->bc.mtr());
+ ReedsSheppStateSpace rsss(this->bc_.mtr());
return rsss.distance(q0, q1);
}
-double RRTExt6::cost_search(RRTNode &f, RRTNode &t)
+double
+RRTExt6::cost_search(RRTNode const& f, RRTNode const& t) const
{
- double q0[] = {f.x(), f.y(), f.h()};
- double q1[] = {t.x(), t.y(), t.h()};
- ReedsSheppStateSpace rsss(this->bc.mtr());
- return rsss.distance(q0, q1);
+ return this->cost_build(f, t);
}
+
+} // namespace rrts