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/Color.hh>
21#include <ignition/math/Matrix4.hh>
22#include <ignition/math/Quaternion.hh>
23#include <ignition/math/Vector3.hh>
24
26
28#include "gazebo/util/system.hh"
29
30namespace gazebo
31{
32 namespace rendering
33 {
36
40 class GZ_RENDERING_VISIBLE Conversions
41 {
45 public: static Ogre::ColourValue Convert(
46 const ignition::math::Color &_clr);
47
51 public: static ignition::math::Color Convert(
52 const Ogre::ColourValue &_clr);
53
57 public: static ignition::math::Vector3d ConvertIgn(
58 const Ogre::Vector3 &_v);
59
63 public: static Ogre::Vector3 Convert(const ignition::math::Vector3d &_v);
64
68 public: static ignition::math::Quaterniond ConvertIgn(
69 const Ogre::Quaternion &_q);
70
74 public: static Ogre::Quaternion Convert(
75 const ignition::math::Quaterniond &_q);
76
80 public: static ignition::math::Matrix4d ConvertIgn(
81 const Ogre::Matrix4 &_m);
82
86 public: static Ogre::Matrix4 Convert(const ignition::math::Matrix4d &_m);
87
91 public: static Ogre::Node::TransformSpace Convert(
92 const ReferenceFrame &_rf);
93
97 public: static ReferenceFrame Convert(
98 const Ogre::Node::TransformSpace &_ts);
99 };
101 }
102}
103#endif
rendering
Definition RenderEngine.hh:31
Conversions Conversions.hh rendering/Conversions.hh.
Definition rendering/Conversions.hh:41
static ignition::math::Vector3d ConvertIgn(const Ogre::Vector3 &_v)
Return ignition::math::Vector3d from Ogre Vector3.
static Ogre::Node::TransformSpace Convert(const ReferenceFrame &_rf)
Return the equivalent ogre transform space.
static Ogre::ColourValue Convert(const ignition::math::Color &_clr)
Return the equivalent ogre color.
static ReferenceFrame Convert(const Ogre::Node::TransformSpace &_ts)
Return the equivalent gazebo reference frame.
static Ogre::Matrix4 Convert(const ignition::math::Matrix4d &_m)
Ignition math Matrix4d to Ogre Matrix4.
static Ogre::Quaternion Convert(const ignition::math::Quaterniond &_q)
ignition::math::Quaterniond to Ogre quaternion
static Ogre::Vector3 Convert(const ignition::math::Vector3d &_v)
Return Ogre Vector3 from ignition::math::Vector3d.
static ignition::math::Quaterniond ConvertIgn(const Ogre::Quaternion &_q)
Ogre quaternion to ignition::math::Quaterniond.
static ignition::math::Matrix4d ConvertIgn(const Ogre::Matrix4 &_m)
Ogre Matrix4 to ignition math Matrix4d.
static ignition::math::Color Convert(const Ogre::ColourValue &_clr)
Return the equivalent color.
ReferenceFrame
Frame of reference.
Definition RenderTypes.hh:245
Forward declarations for the common classes.
Definition Animation.hh:27