Skip to content
Snippets Groups Projects
Commit 3576ed73 authored by Timo Weberruß's avatar Timo Weberruß
Browse files

Use ConvexHullGenerator in HumanGrouper

parent 7c6a6135
No related branches found
No related tags found
2 merge requests!109Social layers,!55Draft: Implement human grouping
...@@ -34,7 +34,7 @@ namespace armarx::navigation::human ...@@ -34,7 +34,7 @@ namespace armarx::navigation::human
* @brief A GroupShapeGenerator that defines the group shape of a set of humans as the * @brief A GroupShapeGenerator that defines the group shape of a set of humans as the
* convex hull of their positions in 2D space. * convex hull of their positions in 2D space.
*/ */
class ConvexHullGenerator : GroupShapeGenerator class ConvexHullGenerator : public GroupShapeGenerator
{ {
public: public:
ConvexHullGenerator(); ConvexHullGenerator();
......
#include "CombinedDistance.h" #include "CombinedDistance.h"
#include "ConvexHullGenerator.h"
#include "HumanGrouper.h" #include "HumanGrouper.h"
namespace armarx::navigation::human namespace armarx::navigation::human
...@@ -6,12 +7,13 @@ namespace armarx::navigation::human ...@@ -6,12 +7,13 @@ namespace armarx::navigation::human
HumanGrouper::HumanGrouper(GroupingSettings settings) : settings(settings) HumanGrouper::HumanGrouper(GroupingSettings settings) : settings(settings)
{ {
this->distanceFunction = new CombinedDistance(settings.maxOrientationInfluence); this->distanceFunction = new CombinedDistance(settings.maxOrientationInfluence);
this->shapeGenerator = NULL; // TODO: implement and use interface this->shapeGenerator = new ConvexHullGenerator();
} }
HumanGrouper::~HumanGrouper() HumanGrouper::~HumanGrouper()
{ {
delete this->distanceFunction; delete this->distanceFunction;
delete this->shapeGenerator;
} }
void HumanGrouper::updateHumans(std::vector<human::Human> &newHumans) void HumanGrouper::updateHumans(std::vector<human::Human> &newHumans)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment