36 #ifndef _MathConvert_H__ 37 #define _MathConvert_H__ 55 std::ostringstream ostream;
56 if (ostream << input.x <<
',' << input.y)
58 (*output) = ostream.str();
71 std::ostringstream ostream;
72 if (ostream << input.x <<
',' << input.y <<
',' << input.z)
74 (*output) = ostream.str();
87 std::ostringstream ostream;
88 if (ostream << input.x <<
',' << input.y <<
',' << input.z <<
',' << input.w)
90 (*output) = ostream.str();
103 std::ostringstream ostream;
104 if (ostream << input.w <<
',' << input.x <<
',' << input.y <<
',' << input.z)
106 (*output) = ostream.str();
119 std::ostringstream ostream;
120 if (ostream << input.r <<
',' << input.g <<
',' << input.b <<
',' << input.a)
122 (*output) = ostream.str();
156 template <
class ToType>
161 return convertValue<Ogre::Real, ToType>(output, input.valueRadians());
166 template <
class ToType>
171 return convertValue<Ogre::Real, ToType>(output, input.valueDegrees());
176 template <
class FromType>
193 template <
class FromType>
#define _UtilExport
Definition: UtilPrereqs.h:60
static ORX_FORCEINLINE bool convert(orxonox::Radian *output, const FromType &input)
Definition: MathConvert.h:179
::std::string string
Definition: gtest-port.h:756
Default template if no orxonox::ConverterExplicit is available.
Definition: Convert.h:308
static ORX_FORCEINLINE bool convert(ToType *output, const orxonox::Radian &input)
Definition: MathConvert.h:159
static ORX_FORCEINLINE bool convert(std::string *output, const orxonox::Vector4 &input)
Definition: MathConvert.h:85
static ORX_FORCEINLINE bool convert(std::string *output, const orxonox::ColourValue &input)
Definition: MathConvert.h:117
Default template. No conversion available at all.
Definition: Convert.h:149
Functions that convert values between different types.
Declaration and implementation of several math-functions, typedefs of some Ogre::Math classes to the ...
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
ORX_FORCEINLINE bool convertValue(ToType *output, const FromType &input)
Converts any value to any other as long as there exists a conversion.
Definition: Convert.h:335
Shared library macros, enums, constants and forward declarations for the util library ...
static ORX_FORCEINLINE bool convert(std::string *output, const orxonox::Vector2 &input)
Definition: MathConvert.h:53
static ORX_FORCEINLINE bool convert(std::string *output, const orxonox::Vector3 &input)
Definition: MathConvert.h:69
static ORX_FORCEINLINE bool convert(orxonox::Degree *output, const FromType &input)
Definition: MathConvert.h:196
static ORX_FORCEINLINE bool convert(std::string *output, const orxonox::Quaternion &input)
Definition: MathConvert.h:101
#define ORX_FORCEINLINE
Definition: OrxonoxConfig.h:95
static ORX_FORCEINLINE bool convert(ToType *output, const orxonox::Degree &input)
Definition: MathConvert.h:169
static ORX_FORCEINLINE bool convert(ToType *output, const FromType &input)
Definition: Convert.h:311