diff --git a/source/RobotAPI/components/ArViz/CMakeLists.txt b/source/RobotAPI/components/ArViz/CMakeLists.txt index 08384750165cd903a4002625994dbb45405821a3..696d953ae61d0d27f4894265b3a963a89298f1ac 100644 --- a/source/RobotAPI/components/ArViz/CMakeLists.txt +++ b/source/RobotAPI/components/ArViz/CMakeLists.txt @@ -12,6 +12,7 @@ set(SOURCES Client/Elements.cpp Client/elements/Mesh.cpp + Client/elements/Robot.cpp Coin/ElementVisualizer.cpp @@ -69,6 +70,7 @@ set(HEADERS Client/elements/Mesh.h Client/elements/MeshCGALExtensions.h Client/elements/PointCloud.h + Client/elements/Robot.h Client/elements/point_cloud_type_traits.hpp diff --git a/source/RobotAPI/components/ArViz/Client/Elements.h b/source/RobotAPI/components/ArViz/Client/Elements.h index 175bfbe3b8fb450577e9245547d8b857f3261768..ef4c6f66a502b9c844551636431fc0d1a6ec52e0 100644 --- a/source/RobotAPI/components/ArViz/Client/Elements.h +++ b/source/RobotAPI/components/ArViz/Client/Elements.h @@ -17,8 +17,9 @@ #include "Color.h" #include "elements/ElementOps.h" -#include "elements/PointCloud.h" #include "elements/Mesh.h" +#include "elements/PointCloud.h" +#include "elements/Robot.h" // The has_member macro causes compile errors if *any* other header uses // the identifier has_member. Boost.Thread does, so this causes compile @@ -448,63 +449,6 @@ namespace armarx::viz }; - class Robot : public ElementOps<Robot, data::ElementRobot> - { - public: - using ElementOps::ElementOps; - - Robot& file(std::string const& project, std::string const& filename) - { - data_->project = project; - data_->filename = filename; - - return *this; - } - - Robot& useCollisionModel() - { - data_->drawStyle |= data::ModelDrawStyle::COLLISION; - - return *this; - } - - Robot& useFullModel() - { - data_->drawStyle &= ~data::ModelDrawStyle::COLLISION; - - return *this; - } - - Robot& overrideColor(Color c) - { - data_->drawStyle |= data::ModelDrawStyle::OVERRIDE_COLOR; - - return color(c); - } - - Robot& useOriginalColor() - { - data_->drawStyle &= ~data::ModelDrawStyle::OVERRIDE_COLOR; - - return *this; - } - - Robot& joint(std::string const& name, float value) - { - data_->jointValues[name] = value; - - return *this; - } - - Robot& joints(std::map<std::string, float> const& values) - { - data_->jointValues = values; - - return *this; - } - }; - - class Object : public ElementOps<Object, data::ElementObject> { private: diff --git a/source/RobotAPI/components/ArViz/Client/elements/Robot.cpp b/source/RobotAPI/components/ArViz/Client/elements/Robot.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f6f45c63bcc815897b95652d40c254c4c3184563 --- /dev/null +++ b/source/RobotAPI/components/ArViz/Client/elements/Robot.cpp @@ -0,0 +1,6 @@ +#include "Robot.h" + +Robot::Robot() +{ + +} diff --git a/source/RobotAPI/components/ArViz/Client/elements/Robot.h b/source/RobotAPI/components/ArViz/Client/elements/Robot.h new file mode 100644 index 0000000000000000000000000000000000000000..b19d92de2110acadd10d5b57b577e40749a63687 --- /dev/null +++ b/source/RobotAPI/components/ArViz/Client/elements/Robot.h @@ -0,0 +1,75 @@ +#pragma once + +#include "ElementOps.h" + + +namespace armarx +{ + ///#include <RobotAPI/libraries/RobotStatechartHelpers/RobotNameHelper.h> + class RobotNameHelper; + ///#include <RobotAPI/interface/core/RobotState.h> + class RobotInfoNode; + class RobotStateComponentInterfacePrx; +} + + +namespace armarx::viz +{ + + class Robot : public ElementOps<Robot, data::ElementRobot> + { + public: + using ElementOps::ElementOps; + + Robot& file(std::string const& project, std::string const& filename) + { + data_->project = project; + data_->filename = filename; + + return *this; + } + + Robot& useCollisionModel() + { + data_->drawStyle |= data::ModelDrawStyle::COLLISION; + + return *this; + } + + Robot& useFullModel() + { + data_->drawStyle &= ~data::ModelDrawStyle::COLLISION; + + return *this; + } + + Robot& overrideColor(Color c) + { + data_->drawStyle |= data::ModelDrawStyle::OVERRIDE_COLOR; + + return color(c); + } + + Robot& useOriginalColor() + { + data_->drawStyle &= ~data::ModelDrawStyle::OVERRIDE_COLOR; + + return *this; + } + + Robot& joint(std::string const& name, float value) + { + data_->jointValues[name] = value; + + return *this; + } + + Robot& joints(std::map<std::string, float> const& values) + { + data_->jointValues = values; + + return *this; + } + }; + +}