| Line |
Branch |
Exec |
Source |
| 1 |
|
|
// |
| 2 |
|
|
// Copyright (c) CNRS |
| 3 |
|
|
// Authors: Joseph Mirabel and Heidy Dallard |
| 4 |
|
|
// |
| 5 |
|
|
|
| 6 |
|
|
#include <gepetto/gui/mainwindow.hh> |
| 7 |
|
|
#include <gepetto/gui/windows-manager.hh> |
| 8 |
|
|
#include <hppmanipulationwidgetsplugin/roadmap.hh> |
| 9 |
|
|
#include <sstream> |
| 10 |
|
|
#include <string> |
| 11 |
|
|
|
| 12 |
|
|
namespace hpp { |
| 13 |
|
|
namespace gui { |
| 14 |
|
✗ |
ManipulationRoadmap::ManipulationRoadmap(HppManipulationWidgetsPlugin* plugin) |
| 15 |
|
✗ |
: Roadmap(plugin), plugin_(plugin) {} |
| 16 |
|
|
|
| 17 |
|
✗ |
void ManipulationRoadmap::initRoadmapFromJoint(const std::string& jointName) { |
| 18 |
|
✗ |
Roadmap::initRoadmapFromJoint(jointName); |
| 19 |
|
✗ |
nodeColorMap_ = gepetto::gui::ColorMap((1 << 7) - 1); |
| 20 |
|
|
} |
| 21 |
|
|
|
| 22 |
|
✗ |
void ManipulationRoadmap::initRoadmapFromBody(const std::string& bodyName) { |
| 23 |
|
✗ |
Roadmap::initRoadmapFromBody(bodyName); |
| 24 |
|
✗ |
nodeColorMap_ = gepetto::gui::ColorMap((1 << 7) - 1); |
| 25 |
|
|
} |
| 26 |
|
|
|
| 27 |
|
✗ |
void ManipulationRoadmap::nodeColor(NodeID nodeId, Color& color) { |
| 28 |
|
✗ |
hpp::floatSeq_var q = plugin_->client()->problem()->node(nodeId); |
| 29 |
|
|
hpp::ID idGraph; |
| 30 |
|
✗ |
plugin_->manipClient()->graph()->getNode(q.in(), idGraph); |
| 31 |
|
✗ |
nodeColorMap_.getColor(idGraph, color); |
| 32 |
|
|
} |
| 33 |
|
|
} // namespace gui |
| 34 |
|
|
} // namespace hpp |
| 35 |
|
|
|