Gazebo Rendering

API Reference

6.6.3
gz/rendering/ogre/OgreConversions.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 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 GZ_RENDERING_OGRE_OGRECONVERSIONS_HH_
18 #define GZ_RENDERING_OGRE_OGRECONVERSIONS_HH_
19 
20 #include <gz/math/Color.hh>
21 #include <gz/math/Matrix4.hh>
22 #include <gz/math/Quaternion.hh>
23 #include <gz/math/Vector3.hh>
24 
27 #include "gz/rendering/ogre/Export.hh"
28 
29 namespace ignition
30 {
31  namespace rendering
32  {
33  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
34  //
37 
41  class IGNITION_RENDERING_OGRE_VISIBLE OgreConversions
42  {
46  public: static Ogre::ColourValue Convert(
47  const math::Color &_color);
48 
52  public: static math::Color Convert(
53  const Ogre::ColourValue &_color);
54 
58  public: static Ogre::Vector3 Convert(const math::Vector3d &_vector);
59 
63  public: static math::Vector3d Convert(const Ogre::Vector3 &_vector);
64 
68  public: static Ogre::Quaternion Convert(const math::Quaterniond &_quat);
69 
73  public: static math::Quaterniond Convert(const Ogre::Quaternion &_quat);
74 
78  public: static Ogre::Radian Convert(const math::Angle &_angle);
79 
83  public: static math::Angle Convert(const Ogre::Radian &_angle);
84 
88  public: static math::Matrix4d Convert(const Ogre::Matrix4 &_m);
89 
93  public: static Ogre::Matrix4 Convert(const math::Matrix4d &_m);
94 
98  public: static Ogre::PixelFormat Convert(PixelFormat _format);
99 
100  private: static const Ogre::PixelFormat ogrePixelFormats[PF_COUNT];
101  };
103  }
104  }
105 }
106 #endif
PixelFormat
Image pixel format types.
Definition: gz/rendering/PixelFormat.hh:32
Conversions Conversions.hh rendering/Conversions.hh.
Definition: gz/rendering/ogre/OgreConversions.hh:41
@ PF_COUNT
< Number of pixel format types
Definition: gz/rendering/PixelFormat.hh:61