rendering/Conversions.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 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_RENDERING_CONVERSIONS_HH_
18 #define GAZEBO_RENDERING_CONVERSIONS_HH_
19 
20 #include <ignition/math/Quaternion.hh>
21 #include <ignition/math/Vector3.hh>
22 
24 
25 #include "gazebo/common/Color.hh"
26 #include "gazebo/math/Vector3.hh"
29 #include "gazebo/util/system.hh"
30 
31 namespace gazebo
32 {
33  namespace rendering
34  {
37 
41  class GZ_RENDERING_VISIBLE Conversions
42  {
46  public: static Ogre::ColourValue Convert(const common::Color &_clr);
47 
51  public: static common::Color Convert(const Ogre::ColourValue &_clr);
52 
57  public: static Ogre::Vector3 Convert(const math::Vector3 &_v)
58  GAZEBO_DEPRECATED(8.0);
59 
64  public: static math::Vector3 Convert(const Ogre::Vector3 &_v)
65  GAZEBO_DEPRECATED(8.0);
66 
70  public: static ignition::math::Vector3d ConvertIgn(
71  const Ogre::Vector3 &_v);
72 
76  public: static Ogre::Vector3 Convert(const ignition::math::Vector3d &_v);
77 
82  public: static Ogre::Quaternion Convert(const math::Quaternion &_v)
83  GAZEBO_DEPRECATED(8.0);
84 
89  public: static math::Quaternion Convert(const Ogre::Quaternion &_v)
90  GAZEBO_DEPRECATED(8.0);
91 
95  public: static ignition::math::Quaterniond ConvertIgn(
96  const Ogre::Quaternion &_q);
97 
101  public: static Ogre::Quaternion Convert(
102  const ignition::math::Quaterniond &_q);
103 
107  public: static ignition::math::Matrix4d ConvertIgn(
108  const Ogre::Matrix4 &_m);
109 
113  public: static Ogre::Matrix4 Convert(const ignition::math::Matrix4d &_m);
114 
118  public: static Ogre::Node::TransformSpace Convert(
119  const ReferenceFrame &_rf);
120 
124  public: static ReferenceFrame Convert(
125  const Ogre::Node::TransformSpace &_ts);
126  };
128  }
129 }
130 #endif
ReferenceFrame
Frame of reference.
Definition: RenderTypes.hh:239
Forward declarations for the common classes.
Definition: Animation.hh:33
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:44
GAZEBO_VISIBLE ignition::math::Vector3d ConvertIgn(const msgs::Vector3d &_v)
Convert a msgs::Vector3d to an ignition::math::Vector.
GAZEBO_VISIBLE msgs::Vector3d Convert(const ignition::math::Vector3d &_v)
Convert a ignition::math::Vector3 to a msgs::Vector3d.
Conversions Conversions.hh rendering/Conversions.hh.
Definition: rendering/Conversions.hh:41
A quaternion class.
Definition: Quaternion.hh:48
Defines a color.
Definition: Color.hh:36
#define GAZEBO_DEPRECATED(version)
Definition: system.hh:302