AdvancedCoinVisualizationFactory.cpp
Go to the documentation of this file.
2 
3 ///ARMARX_INCLUDES
6 
7 ///VIRTUALROBOT_INCLUDES
8 #include "VirtualRobot/Visualization/CoinVisualization/CoinVisualizationFactory.h"
9 #include "VirtualRobot/Visualization/CoinVisualization/CoinVisualizationNode.h"
10 
11 ///COIN3D INCLUDES
12 #include <Inventor/nodes/SoSeparator.h>
13 
14 using namespace armarx;
15 using namespace VirtualRobot;
16 
17 
19 {
20  component = CoinVisualizationFactory();
21 }
22 VisualizationNodePtr AdvancedCoinVisualizationFactory::createCurve(const std::vector<PoseBasePtr> points, bool highlight)
23 {
24  std::vector<VirtualRobot::VisualizationNodePtr> visualizations = std::vector<VirtualRobot::VisualizationNodePtr>();
25  CoinVisualizationNodePtr parent = CoinVisualizationNodePtr(new CoinVisualizationNode(new SoSeparator()));
26  for (unsigned int i = 0; i < points.size() - 1; i++)
27  {
28  PosePtr pose1 = PosePtr(new Pose(points[i]->position, points[i]->orientation));
29  PosePtr pose2 = PosePtr(new Pose(points[i + 1]->position, points[i + 1]->orientation));
30  VisualizationNodePtr node;
31  if (!highlight)
32  {
33  node = CoinVisualizationFactory().createLine(pose1->toEigen(), pose2->toEigen(), 7.375, 254.0, 1, 1); //blue transition
34  }
35  else
36  {
37  node = CoinVisualizationFactory().createLine(pose1->toEigen(), pose2->toEigen(), 7.375, 0, 254.0, 0); //red transition
38  }
39  parent->attachVisualization("", node);
40  }
41  return parent;
42 }
43 
44 /*CoinManipulatorVisualizationAdapterPtr AdvancedCoinVisualizationFactory::createManipulator()
45 {
46  CoinManipulatorVisualizationAdapterPtr s;
47  return *new CoinManipulatorVisualizationAdapterPtr(new CoinManipulatorVisualizationAdapter());
48 }*/
AdvancedCoinVisualizationFactory.h
armarx::navigation::core::Pose
Eigen::Isometry3f Pose
Definition: basic_types.h:31
armarx::ProxyType::component
@ component
VirtualRobot
Definition: FramedPose.h:43
armarx::PosePtr
IceInternal::Handle< Pose > PosePtr
Definition: Pose.h:306
Pose.h
armarx::AdvancedCoinVisualizationFactory::AdvancedCoinVisualizationFactory
AdvancedCoinVisualizationFactory()
AdvancedCoinVisualizationFactory Initializes the CoinVisualizationFactory.
Definition: AdvancedCoinVisualizationFactory.cpp:18
IceInternal::Handle< Pose >
armarx::AdvancedCoinVisualizationFactory::createCurve
VirtualRobot::VisualizationNodePtr createCurve(const std::vector< PoseBasePtr > points, bool highlight) override
createCurve creates the visualization of a curve that goes through the Waypoints in transition
Definition: AdvancedCoinVisualizationFactory.cpp:22
Logging.h
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28