sdf_api_wrapper.hpp
Go to the documentation of this file.
00001 /*
00002  * Copyright 2015 Fadri Furrer, ASL, ETH Zurich, Switzerland
00003  * Copyright 2015 Michael Burri, ASL, ETH Zurich, Switzerland
00004  * Copyright 2015 Mina Kamel, ASL, ETH Zurich, Switzerland
00005  * Copyright 2015 Janosch Nikolic, ASL, ETH Zurich, Switzerland
00006  * Copyright 2015 Markus Achtelik, ASL, ETH Zurich, Switzerland
00007  *
00008  * Licensed under the Apache License, Version 2.0 (the "License");
00009  * you may not use this file except in compliance with the License.
00010  * You may obtain a copy of the License at
00011  *
00012  *     http://www.apache.org/licenses/LICENSE-2.0
00013 
00014  * Unless required by applicable law or agreed to in writing, software
00015  * distributed under the License is distributed on an "AS IS" BASIS,
00016  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00017  * See the License for the specific language governing permissions and
00018  * limitations under the License.
00019  */
00020 
00021 
00022 #ifndef ROTORS_GAZEBO_PLUGINS_SDF_API_WRAPPER_H
00023 #define ROTORS_GAZEBO_PLUGINS_SDF_API_WRAPPER_H
00024 
00025 #include <gazebo/gazebo.hh>
00026 
00027 namespace gazebo {
00028 
00029 #if SDF_MAJOR_VERSION >= 3
00030   typedef ignition::math::Vector3d SdfVector3;
00031 #else
00032   class SdfVector3 : public sdf::Vector3 {
00033   /*
00034   A wrapper class for deprecated sdf::Vector3 class to provide the same accessor
00035   functions as in the newer ignition::math::Vector3 class.
00036   */
00037 
00038    public:
00039     using sdf::Vector3::Vector3;
00040     virtual ~SdfVector3() {}
00041 
00044     double X() { return this->x; }
00045 
00048     double Y() { return this->y; }
00049 
00052     double Z() { return this->z; }
00053   };
00054 #endif
00055 }
00056 
00057 #endif // ROTORS_GAZEBO_PLUGINS_SDF_API_WRAPPER_H


rotors_gazebo_plugins
Author(s): Fadri Furrer, Michael Burri, Mina Kamel, Janosch Nikolic, Markus Achtelik
autogenerated on Thu Apr 18 2019 02:43:43