From a1636f06c0c8e41928297c0bd67339f67899c9c4 Mon Sep 17 00:00:00 2001 From: Raphael Grimm <raphael.grimm@kit.edu> Date: Tue, 26 May 2020 09:39:19 +0200 Subject: [PATCH] Stop using boost::shared_ptr --- MotionPlanning/examples/IKRRT/IKRRTWindow.cpp | 2 +- VirtualRobot/Import/Legacy/COLLADA/ColladaIO.cpp | 8 ++++---- VirtualRobot/Import/Legacy/COLLADA/ColladaIO.h | 6 +++--- .../examples/Legacy/ColladaViewer/showRobotWindow.h | 2 +- VirtualRobot/examples/RobotViewer/showRobotWindow.cpp | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/MotionPlanning/examples/IKRRT/IKRRTWindow.cpp b/MotionPlanning/examples/IKRRT/IKRRTWindow.cpp index 2975e9b29..1fdc67198 100644 --- a/MotionPlanning/examples/IKRRT/IKRRTWindow.cpp +++ b/MotionPlanning/examples/IKRRT/IKRRTWindow.cpp @@ -605,7 +605,7 @@ void IKRRTWindow::reachVisu() } /* - boost::shared_ptr<VirtualRobot::CoinVisualization> visualization = reachSpace->getVisualization<CoinVisualization>(); + VirtualRobot::CoinVisualizationPtr visualization = reachSpace->getVisualization<CoinVisualization>(); SoNode* visualisationNode = NULL; if (visualization) visualisationNode = visualization->getCoinVisualization(); diff --git a/VirtualRobot/Import/Legacy/COLLADA/ColladaIO.cpp b/VirtualRobot/Import/Legacy/COLLADA/ColladaIO.cpp index 17a45bbbd..f446ac798 100644 --- a/VirtualRobot/Import/Legacy/COLLADA/ColladaIO.cpp +++ b/VirtualRobot/Import/Legacy/COLLADA/ColladaIO.cpp @@ -184,7 +184,7 @@ namespace VirtualRobot return result; } - bool ColladaIO::addGeometry(boost::shared_ptr<VirtualRobot::TriMeshModel> triMesh, Eigen::Matrix4f& preModelTrafo, ColladaParser::SceneGraph::GeometryType& geom, float scaling) + bool ColladaIO::addGeometry(VirtualRobot::TriMeshModelPtr triMesh, Eigen::Matrix4f& preModelTrafo, ColladaParser::SceneGraph::GeometryType& geom, float scaling) { bool perVertexNormals = false; @@ -425,7 +425,7 @@ namespace VirtualRobot //TODO: This fails when several meshes are connected to the same node!! - bool ColladaIO::addSceneGraph(boost::shared_ptr<VirtualRobot::TriMeshModel> triMesh, boost::shared_ptr<ColladaParser::SceneGraph> sceneGraph, const Eigen::Matrix4f& modelTrafo, float scaling) + bool ColladaIO::addSceneGraph(VirtualRobot::TriMeshModelPtr triMesh, boost::shared_ptr<ColladaParser::SceneGraph> sceneGraph, const Eigen::Matrix4f& modelTrafo, float scaling) { if (!triMesh || !sceneGraph) { @@ -449,9 +449,9 @@ namespace VirtualRobot return true; } - boost::shared_ptr<VirtualRobot::TriMeshModel> ColladaIO::getMesh(boost::shared_ptr<ColladaParser::NodeData> colladaNode, const Eigen::Matrix4f& modelTrafo, float scaling) + VirtualRobot::TriMeshModelPtr ColladaIO::getMesh(boost::shared_ptr<ColladaParser::NodeData> colladaNode, const Eigen::Matrix4f& modelTrafo, float scaling) { - boost::shared_ptr<VirtualRobot::TriMeshModel> triMeshPtr; + VirtualRobot::TriMeshModelPtr triMeshPtr; if (colladaNode->sceneGraph && (colladaNode->sceneGraph->geometries.size() > 0 || colladaNode->sceneGraph->children.size() > 0)) { diff --git a/VirtualRobot/Import/Legacy/COLLADA/ColladaIO.h b/VirtualRobot/Import/Legacy/COLLADA/ColladaIO.h index f0818239b..96aef63be 100644 --- a/VirtualRobot/Import/Legacy/COLLADA/ColladaIO.h +++ b/VirtualRobot/Import/Legacy/COLLADA/ColladaIO.h @@ -37,9 +37,9 @@ namespace VirtualRobot static Eigen::Matrix4f getTransformation(std::vector<float>& trafo, float scaling); static Eigen::Matrix4f getTransformation(std::vector<std::vector<float> >& trafos, float scaling); static Eigen::Vector3f getAxis(boost::shared_ptr<ColladaParser::NodeData> colladaNode); - static boost::shared_ptr<VirtualRobot::TriMeshModel> getMesh(boost::shared_ptr<ColladaParser::NodeData> colladaNode, const Eigen::Matrix4f& modelTrafo, float scaling); - static bool addSceneGraph(boost::shared_ptr<VirtualRobot::TriMeshModel> triMesh, boost::shared_ptr<ColladaParser::SceneGraph> sceneGraph, const Eigen::Matrix4f& modelTrafo, float scaling); - static bool addGeometry(boost::shared_ptr<VirtualRobot::TriMeshModel> triMesh, Eigen::Matrix4f& preModelTrafo, ColladaParser::SceneGraph::GeometryType& geom, float scaling); + static VirtualRobot::TriMeshModelPtr getMesh(boost::shared_ptr<ColladaParser::NodeData> colladaNode, const Eigen::Matrix4f& modelTrafo, float scaling); + static bool addSceneGraph(VirtualRobot::TriMeshModelPtr triMesh, boost::shared_ptr<ColladaParser::SceneGraph> sceneGraph, const Eigen::Matrix4f& modelTrafo, float scaling); + static bool addGeometry(VirtualRobot::TriMeshModelPtr triMesh, Eigen::Matrix4f& preModelTrafo, ColladaParser::SceneGraph::GeometryType& geom, float scaling); }; } diff --git a/VirtualRobot/examples/Legacy/ColladaViewer/showRobotWindow.h b/VirtualRobot/examples/Legacy/ColladaViewer/showRobotWindow.h index cb0e403fa..02580bb2f 100644 --- a/VirtualRobot/examples/Legacy/ColladaViewer/showRobotWindow.h +++ b/VirtualRobot/examples/Legacy/ColladaViewer/showRobotWindow.h @@ -99,6 +99,6 @@ protected: bool physicsCoMEnabled; bool physicsInertiaEnabled; - boost::shared_ptr<VirtualRobot::CoinVisualization> visualization; + VirtualRobot::CoinVisualizationPtr visualization; }; diff --git a/VirtualRobot/examples/RobotViewer/showRobotWindow.cpp b/VirtualRobot/examples/RobotViewer/showRobotWindow.cpp index 0e55487be..c27f615d0 100644 --- a/VirtualRobot/examples/RobotViewer/showRobotWindow.cpp +++ b/VirtualRobot/examples/RobotViewer/showRobotWindow.cpp @@ -959,7 +959,7 @@ void showRobotWindow::updatRobotInfo() useColModel = UI.checkBoxColModel->checkState() == Qt::Checked; SceneObject::VisualizationType colModel = (UI.checkBoxColModel->isChecked()) ? SceneObject::Collision : SceneObject::Full; - boost::shared_ptr<VirtualRobot::CoinVisualization> visualization = r2->getVisualization<CoinVisualization>(colModel); + VirtualRobot::CoinVisualizationPtr visualization = r2->getVisualization<CoinVisualization>(colModel); SoNode* visualisationNode = NULL; if (visualization) -- GitLab