Ignition Rendering

API Reference

5.1.0
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 IGNITION_RENDERING_OGRE2_OGRE2CONVERSIONS_HH_
18 #define IGNITION_RENDERING_OGRE2_OGRE2CONVERSIONS_HH_
19 
20 #include <ignition/math/Color.hh>
21 #include <ignition/math/Matrix4.hh>
23 #include <ignition/math/Vector3.hh>
24 
25 #include "ignition/rendering/config.hh"
27 #include "ignition/rendering/ogre2/Export.hh"
28 
29 #ifdef _MSC_VER
30  #pragma warning(push, 0)
31 #endif
32 
33 #include <OgreColourValue.h>
34 #include <OgreVector3.h>
35 #include <OgrePixelFormat.h>
36 
37 #ifdef _MSC_VER
38  #pragma warning(pop)
39 #endif
40 
41 namespace ignition
42 {
43  namespace rendering
44  {
45  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
46  //
49 
53  class IGNITION_RENDERING_OGRE2_VISIBLE Ogre2Conversions
54  {
58  public: static Ogre::ColourValue Convert(
59  const math::Color &_color);
60 
64  public: static math::Color Convert(
65  const Ogre::ColourValue &_color);
66 
70  public: static Ogre::Vector3 Convert(const math::Vector3d &_vector);
71 
75  public: static math::Vector3d Convert(const Ogre::Vector3 &_vector);
76 
80  public: static Ogre::Quaternion Convert(const math::Quaterniond &_quat);
81 
85  public: static math::Quaterniond Convert(const Ogre::Quaternion &_quat);
86 
90  public: static Ogre::Radian Convert(const math::Angle &_angle);
91 
95  public: static math::Angle Convert(const Ogre::Radian &_angle);
96 
100  public: static math::Matrix4d Convert(const Ogre::Matrix4 &_m);
101 
105  public: static Ogre::Matrix4 Convert(const math::Matrix4d &_m);
106 
110  public: static Ogre::PixelFormat Convert(PixelFormat _format);
111 
113  private: static const Ogre::PixelFormat ogrePixelFormats[PF_COUNT];
114  };
116  }
117  }
118 }
119 #endif
PixelFormat
Image pixel format types.
Definition: PixelFormat.hh:32
< Number of pixel format types
Definition: PixelFormat.hh:59
Conversions Conversions.hh rendering/Conversions.hh.
Definition: Ogre2Conversions.hh:53