rendering/Conversions.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2016 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 #ifndef _GAZEBO_CONVERSIONS_HH_
18 #define _GAZEBO_CONVERSIONS_HH_
19 
20 #include <ignition/math/Vector3.hh>
21 
23 
24 #include "gazebo/common/Color.hh"
25 #include "gazebo/math/Vector3.hh"
28 #include "gazebo/util/system.hh"
29 
30 namespace gazebo
31 {
32  namespace rendering
33  {
36 
41  {
45  public: static Ogre::ColourValue Convert(const common::Color &_clr);
46 
50  public: static common::Color Convert(const Ogre::ColourValue &_clr);
51 
55  public: static Ogre::Vector3 Convert(const math::Vector3 &_v);
56 
60  public: static Ogre::Vector3 Convert(const ignition::math::Vector3d &_v);
61 
65  public: static math::Vector3 Convert(const Ogre::Vector3 &_v);
66 
70  public: static ignition::math::Vector3d ConvertIgn(
71  const Ogre::Vector3 &_v);
72 
76  public: static Ogre::Quaternion Convert(const math::Quaternion &_v);
77 
81  public: static math::Quaternion Convert(const Ogre::Quaternion &_v);
82 
86  public: static ignition::math::Quaterniond ConvertIgn(
87  const Ogre::Quaternion &_v);
88 
92  public: static Ogre::Node::TransformSpace Convert(
93  const ReferenceFrame &_rf);
94 
98  public: static ReferenceFrame Convert(
99  const Ogre::Node::TransformSpace &_ts);
100  };
102  }
103 }
104 #endif
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:39
GAZEBO_VISIBLE ignition::math::Vector3d ConvertIgn(const msgs::Vector3d &_v)
Convert a msgs::Vector3d to an ignition::math::Vector.
ReferenceFrame
Frame of reference.
Definition: RenderTypes.hh:234
GAZEBO_VISIBLE msgs::Vector3d Convert(const ignition::math::Vector3d &_v)
Convert a ignition::math::Vector3 to a msgs::Vector3d.
#define GZ_RENDERING_VISIBLE
Definition: system.hh:209
Conversions Conversions.hh rendering/Conversions.hh.
Definition: rendering/Conversions.hh:40
A quaternion class.
Definition: Quaternion.hh:42
Defines a color.
Definition: Color.hh:36