diff --git a/examples/gazebo_scene_viewer/SceneManager.cc b/examples/gazebo_scene_viewer/SceneManager.cc index 1afc21eb6..9847e1050 100644 --- a/examples/gazebo_scene_viewer/SceneManager.cc +++ b/examples/gazebo_scene_viewer/SceneManager.cc @@ -1480,19 +1480,6 @@ void SubSceneManager::ProcessCylinder( } //! [process cylinder] -////////////////////////////////////////////////// -void SubSceneManager::ProcessEllipsoid( - const gazebo::msgs::Geometry & _geometryMsg, VisualPtr _parent) -{ - GeometryPtr ellipsoid = this->activeScene->CreateEllipsoid(); - const gazebo::msgs::EllipsoidGeom &ellipsoidMsg = _geometryMsg.ellipsoid(); - double x = 2 * ellipsoidMsg.radii().X(); - double y = 2 * ellipsoidMsg.radii().Y(); - double z = 2 * ellipsoidMsg.radii().Z(); - _parent->SetLocalScale(x, y, z); - _parent->AddGeometry(ellipsoid); -} - ////////////////////////////////////////////////// void SubSceneManager::ProcessEmpty(const gazebo::msgs::Geometry&, VisualPtr) { diff --git a/examples/gazebo_scene_viewer/SceneManagerPrivate.hh b/examples/gazebo_scene_viewer/SceneManagerPrivate.hh index da249e71f..5b1dbc3d8 100644 --- a/examples/gazebo_scene_viewer/SceneManagerPrivate.hh +++ b/examples/gazebo_scene_viewer/SceneManagerPrivate.hh @@ -327,9 +327,6 @@ namespace ignition protected: virtual void ProcessCylinder( const gazebo::msgs::Geometry &_geometryMsg, VisualPtr _parent); - protected: virtual void ProcessEllipsoid( - const gazebo::msgs::Geometry &_geometryMsg, VisualPtr _parent); - protected: virtual void ProcessEmpty( const gazebo::msgs::Geometry &_geometryMsg, VisualPtr _parent); diff --git a/examples/simple_demo/GlutWindow.cc b/examples/simple_demo/GlutWindow.cc index 4d0c9a27d..3f52f4010 100644 --- a/examples/simple_demo/GlutWindow.cc +++ b/examples/simple_demo/GlutWindow.cc @@ -81,7 +81,7 @@ void updateCameras() camera->SetLocalPosition(x, y, 0.0); } - g_offset += 0.0005; + g_offset += 0.05; } //! [update camera] diff --git a/examples/simple_demo/Main.cc b/examples/simple_demo/Main.cc index ab2fd7f98..e940c4f86 100644 --- a/examples/simple_demo/Main.cc +++ b/examples/simple_demo/Main.cc @@ -120,8 +120,8 @@ void buildScene(ScenePtr _scene) // create ellipsoid visual VisualPtr ellipsoidVisual = _scene->CreateVisual(); - auto ellipsoid = _scene->CreateEllipsoid(); - ellipsoid->SetRadii(ignition::math::Vector3d(1.2, 0.7, 0.5)); + auto ellipsoid = _scene->CreateSphere(); + ellipsoidVisual->SetLocalScale(1.2, 0.7, 0.5); ellipsoidVisual->AddGeometry(ellipsoid); ellipsoidVisual->SetLocalPosition(3, -1, 0); ellipsoidVisual->SetMaterial(green); diff --git a/include/ignition/rendering/Marker.hh b/include/ignition/rendering/Marker.hh index 6130642d4..93a639b67 100644 --- a/include/ignition/rendering/Marker.hh +++ b/include/ignition/rendering/Marker.hh @@ -65,10 +65,7 @@ namespace ignition MT_TRIANGLE_LIST = 9, /// \brief Triangle strip primitive - MT_TRIANGLE_STRIP = 10, - - /// \brief Ellipsoid geometry - MT_ELLIPSOID = 12, + MT_TRIANGLE_STRIP = 10 }; /// \class Marker Marker.hh ignition/rendering/Marker diff --git a/include/ignition/rendering/Scene.hh b/include/ignition/rendering/Scene.hh index daf3b6c5f..59f983a4f 100644 --- a/include/ignition/rendering/Scene.hh +++ b/include/ignition/rendering/Scene.hh @@ -864,15 +864,13 @@ namespace ignition /// \return The created cylinder public: virtual GeometryPtr CreateCylinder() = 0; - /// \brief Create new ellipsoid geometry - /// \return The created ellipsoid - public: virtual MeshPtr CreateEllipsoid() = 0; - /// \brief Create new plane geometry /// \return The created plane public: virtual GeometryPtr CreatePlane() = 0; - /// \brief Create new sphere geometry + /// \brief Create new sphere or ellipsoid geometry + /// This method allow to create ellipsoid too, because it can be scaled + /// in 3 dimensions. /// \return The created sphere public: virtual GeometryPtr CreateSphere() = 0; diff --git a/include/ignition/rendering/base/BaseScene.hh b/include/ignition/rendering/base/BaseScene.hh index f1fafcddb..9674afebb 100644 --- a/include/ignition/rendering/base/BaseScene.hh +++ b/include/ignition/rendering/base/BaseScene.hh @@ -397,9 +397,6 @@ namespace ignition public: virtual GeometryPtr CreateCylinder() override; - // Documentation inherited. - public: virtual MeshPtr CreateEllipsoid() override; - public: virtual GeometryPtr CreatePlane() override; public: virtual GeometryPtr CreateSphere() override; @@ -558,13 +555,6 @@ namespace ignition protected: virtual GeometryPtr CreateCylinderImpl(unsigned int _id, const std::string &_name) = 0; - /// \brief Implementation for creating a ellipsoid geometry object - /// \param[in] _id unique object id. - /// \param[in] _name unique object name. - /// \return Pointer to a ellipsoid geometry object - protected: virtual MeshPtr CreateEllipsoidImpl(unsigned int _id, - const std::string &_name) = 0; - protected: virtual GeometryPtr CreatePlaneImpl(unsigned int _id, const std::string &_name) = 0; diff --git a/ogre/include/ignition/rendering/ogre/OgreScene.hh b/ogre/include/ignition/rendering/ogre/OgreScene.hh index be5c555a3..99dc5031f 100644 --- a/ogre/include/ignition/rendering/ogre/OgreScene.hh +++ b/ogre/include/ignition/rendering/ogre/OgreScene.hh @@ -127,10 +127,6 @@ namespace ignition protected: virtual GeometryPtr CreateCylinderImpl(unsigned int _id, const std::string &_name) override; - // Documentation inherited - protected: virtual MeshPtr CreateEllipsoidImpl(unsigned int _id, - const std::string &_name); - protected: virtual GeometryPtr CreatePlaneImpl(unsigned int _id, const std::string &_name) override; diff --git a/ogre/src/OgreMarker.cc b/ogre/src/OgreMarker.cc index 70f230b72..3aae5b6a4 100644 --- a/ogre/src/OgreMarker.cc +++ b/ogre/src/OgreMarker.cc @@ -82,7 +82,6 @@ Ogre::MovableObject *OgreMarker::OgreObject() const return nullptr; case MT_BOX: case MT_CYLINDER: - case MT_ELLIPSOID: case MT_SPHERE: return this->dataPtr->mesh->OgreObject(); case MT_LINE_STRIP: @@ -147,7 +146,6 @@ void OgreMarker::SetMaterial(MaterialPtr _material, bool _unique) break; case MT_BOX: case MT_CYLINDER: - case MT_ELLIPSOID: case MT_SPHERE: this->dataPtr->mesh->SetMaterial(derived, false); break; @@ -211,10 +209,6 @@ void OgreMarker::SetType(MarkerType _markerType) this->dataPtr->mesh = std::dynamic_pointer_cast(this->scene->CreateCylinder()); break; - case MT_ELLIPSOID: - this->dataPtr->mesh = - std::dynamic_pointer_cast(this->scene->CreateEllipsoid()); - break; case MT_SPHERE: this->dataPtr->mesh = std::dynamic_pointer_cast(this->scene->CreateSphere()); diff --git a/ogre/src/OgreScene.cc b/ogre/src/OgreScene.cc index bac88231c..588ae92ef 100644 --- a/ogre/src/OgreScene.cc +++ b/ogre/src/OgreScene.cc @@ -502,13 +502,6 @@ MeshPtr OgreScene::CreateMeshImpl(unsigned int _id, const std::string &_name, return this->CreateMeshImpl(_id, _name, descriptor); } -////////////////////////////////////////////////// -MeshPtr OgreScene::CreateEllipsoidImpl( - unsigned int _id, const std::string &_name) -{ - return this->CreateMeshImpl(_id, _name, "unit_ellipsoid"); -} - ////////////////////////////////////////////////// MeshPtr OgreScene::CreateMeshImpl(unsigned int _id, const std::string &_name, const MeshDescriptor &_desc) diff --git a/ogre2/include/ignition/rendering/ogre2/Ogre2Scene.hh b/ogre2/include/ignition/rendering/ogre2/Ogre2Scene.hh index 9838b7a2f..64ecc0386 100644 --- a/ogre2/include/ignition/rendering/ogre2/Ogre2Scene.hh +++ b/ogre2/include/ignition/rendering/ogre2/Ogre2Scene.hh @@ -168,10 +168,6 @@ namespace ignition protected: virtual GeometryPtr CreateCylinderImpl(unsigned int _id, const std::string &_name) override; - // Documentation inherited - protected: virtual MeshPtr CreateEllipsoidImpl(unsigned int _id, - const std::string &_name); - // Documentation inherited protected: virtual GeometryPtr CreatePlaneImpl(unsigned int _id, const std::string &_name) override; diff --git a/ogre2/src/Ogre2Marker.cc b/ogre2/src/Ogre2Marker.cc index ab771c973..82f2be376 100644 --- a/ogre2/src/Ogre2Marker.cc +++ b/ogre2/src/Ogre2Marker.cc @@ -95,7 +95,6 @@ Ogre::MovableObject *Ogre2Marker::OgreObject() const return nullptr; case MT_BOX: case MT_CYLINDER: - case MT_ELLIPSOID: case MT_SPHERE: return this->dataPtr->mesh->OgreObject(); case MT_LINE_STRIP: @@ -160,7 +159,6 @@ void Ogre2Marker::SetMaterial(MaterialPtr _material, bool _unique) break; case MT_BOX: case MT_CYLINDER: - case MT_ELLIPSOID: case MT_SPHERE: this->dataPtr->mesh->SetMaterial(derived, false); break; @@ -243,9 +241,6 @@ void Ogre2Marker::SetType(MarkerType _markerType) case MT_CYLINDER: newMesh = this->scene->CreateCylinder(); break; - case MT_ELLIPSOID: - newMesh = this->scene->CreateEllipsoid(); - break; case MT_SPHERE: newMesh = this->scene->CreateSphere(); break; diff --git a/ogre2/src/Ogre2Scene.cc b/ogre2/src/Ogre2Scene.cc index d91c430ef..43816ec02 100644 --- a/ogre2/src/Ogre2Scene.cc +++ b/ogre2/src/Ogre2Scene.cc @@ -371,12 +371,6 @@ MeshPtr Ogre2Scene::CreateMeshImpl(unsigned int _id, const std::string &_name, return this->CreateMeshImpl(_id, _name, descriptor); } -////////////////////////////////////////////////// -MeshPtr Ogre2Scene::CreateEllipsoidImpl(unsigned int _id, - const std::string &_name) -{ - return this->CreateMeshImpl(_id, _name, "unit_ellipsoid"); -} ////////////////////////////////////////////////// MeshPtr Ogre2Scene::CreateMeshImpl(unsigned int _id, const std::string &_name, const MeshDescriptor &_desc) diff --git a/src/Marker_TEST.cc b/src/Marker_TEST.cc index 31ea34627..486d9064d 100644 --- a/src/Marker_TEST.cc +++ b/src/Marker_TEST.cc @@ -81,9 +81,6 @@ void MarkerTest::Marker(const std::string &_renderEngine) marker->SetType(MarkerType::MT_NONE); EXPECT_EQ(MarkerType::MT_NONE, marker->Type()); - marker->SetType(MarkerType::MT_ELLIPSOID); - EXPECT_EQ(MarkerType::MT_ELLIPSOID, marker->Type()); - marker->SetType(MarkerType::MT_POINTS); EXPECT_EQ(MarkerType::MT_POINTS, marker->Type()); diff --git a/src/base/BaseScene.cc b/src/base/BaseScene.cc index cf88cefcc..43e481d51 100644 --- a/src/base/BaseScene.cc +++ b/src/base/BaseScene.cc @@ -1009,14 +1009,6 @@ GeometryPtr BaseScene::CreatePlane() return this->CreatePlaneImpl(objId, objName); } -////////////////////////////////////////////////// -MeshPtr BaseScene::CreateEllipsoid() -{ - unsigned int objId = this->CreateObjectId(); - std::string objName = this->CreateObjectName(objId, "Ellipsoid"); - return this->CreateEllipsoidImpl(objId, objName); -} - ////////////////////////////////////////////////// GeometryPtr BaseScene::CreateSphere() {