Gazebo Rendering

API Reference

3.7.2
gz/rendering/ogre2/Ogre2Conversions.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018 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_OGRE2_OGRE2CONVERSIONS_HH_
18 #define GZ_RENDERING_OGRE2_OGRE2CONVERSIONS_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 
25 #include "gz/rendering/config.hh"
28 #include "gz/rendering/ogre2/Export.hh"
29 
30 namespace ignition
31 {
32  namespace rendering
33  {
34  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
35  //
38 
42  class IGNITION_RENDERING_OGRE2_VISIBLE Ogre2Conversions
43  {
47  public: static Ogre::ColourValue Convert(
48  const math::Color &_color);
49 
53  public: static math::Color Convert(
54  const Ogre::ColourValue &_color);
55 
59  public: static Ogre::Vector3 Convert(const math::Vector3d &_vector);
60 
64  public: static math::Vector3d Convert(const Ogre::Vector3 &_vector);
65 
69  public: static Ogre::Quaternion Convert(const math::Quaterniond &_quat);
70 
74  public: static math::Quaterniond Convert(const Ogre::Quaternion &_quat);
75 
79  public: static Ogre::Radian Convert(const math::Angle &_angle);
80 
84  public: static math::Angle Convert(const Ogre::Radian &_angle);
85 
89  public: static math::Matrix4d Convert(const Ogre::Matrix4 &_m);
90 
94  public: static Ogre::Matrix4 Convert(const math::Matrix4d &_m);
95 
99  public: static Ogre::PixelFormat Convert(PixelFormat _format);
100 
102  private: static const Ogre::PixelFormat ogrePixelFormats[PF_COUNT];
103  };
105  }
106  }
107 }
108 #endif
PixelFormat
Image pixel format types.
Definition: gz/rendering/PixelFormat.hh:32
Conversions Conversions.hh rendering/Conversions.hh.
Definition: gz/rendering/ogre2/Ogre2Conversions.hh:42
@ PF_COUNT
< Number of pixel format types
Definition: gz/rendering/PixelFormat.hh:59