Changeset 2016 for code/branches/objecthierarchy/src/util/MathConvert.h
- Timestamp:
- Oct 26, 2008, 1:54:15 AM (17 years ago)
- Location:
- code/branches/objecthierarchy/src/util
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/util
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
/code/branches/ceguilua/src/util merged eligible /code/branches/core3/src/util merged eligible /code/branches/gui/src/util merged eligible /code/branches/script_trigger/src/util merged eligible /code/branches/gcc43/src/util 1580 /code/branches/input/src/util 1629-1636
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
-
code/branches/objecthierarchy/src/util/MathConvert.h
r2015 r2016 47 47 // Vector2 to std::string 48 48 template <> 49 struct ConverterExplicit< std::string, orxonox::Vector2>49 struct ConverterExplicit<orxonox::Vector2, std::string> 50 50 { 51 51 static bool convert(std::string* output, const orxonox::Vector2& input) … … 63 63 // Vector3 to std::string 64 64 template <> 65 struct ConverterExplicit< std::string, orxonox::Vector3>65 struct ConverterExplicit<orxonox::Vector3, std::string> 66 66 { 67 67 static bool convert(std::string* output, const orxonox::Vector3& input) … … 79 79 // Vector4 to std::string 80 80 template <> 81 struct ConverterExplicit< std::string, orxonox::Vector4>81 struct ConverterExplicit<orxonox::Vector4, std::string> 82 82 { 83 83 static bool convert(std::string* output, const orxonox::Vector4& input) … … 95 95 // Quaternion to std::string 96 96 template <> 97 struct ConverterExplicit< std::string, orxonox::Quaternion>97 struct ConverterExplicit<orxonox::Quaternion, std::string> 98 98 { 99 99 static bool convert(std::string* output, const orxonox::Quaternion& input) … … 111 111 // ColourValue to std::string 112 112 template <> 113 struct ConverterExplicit< std::string, orxonox::ColourValue>113 struct ConverterExplicit<orxonox::ColourValue, std::string> 114 114 { 115 115 static bool convert(std::string* output, const orxonox::ColourValue& input) … … 131 131 132 132 // std::string to Vector2 133 template <> struct _UtilExport ConverterFallback< orxonox::Vector2, std::string>133 template <> struct _UtilExport ConverterFallback<std::string, orxonox::Vector2> 134 134 { static bool convert(orxonox::Vector2* output, const std::string& input); }; 135 135 // std::string to Vector3 136 template <> struct _UtilExport ConverterFallback< orxonox::Vector3, std::string>136 template <> struct _UtilExport ConverterFallback<std::string, orxonox::Vector3> 137 137 { static bool convert(orxonox::Vector3* output, const std::string& input); }; 138 138 // std::string to Vector4 139 template <> struct _UtilExport ConverterFallback< orxonox::Vector4, std::string>139 template <> struct _UtilExport ConverterFallback<std::string, orxonox::Vector4> 140 140 { static bool convert(orxonox::Vector4* output, const std::string& input); }; 141 141 // std::string to Quaternion 142 template <> struct _UtilExport ConverterFallback< orxonox::Quaternion, std::string>142 template <> struct _UtilExport ConverterFallback<std::string, orxonox::Quaternion> 143 143 { static bool convert(orxonox::Quaternion* output, const std::string& input); }; 144 144 // std::string to ColourValue 145 template <> struct _UtilExport ConverterFallback< orxonox::ColourValue, std::string>145 template <> struct _UtilExport ConverterFallback<std::string, orxonox::ColourValue> 146 146 { static bool convert(orxonox::ColourValue* output, const std::string& input); }; 147 147 … … 153 153 // From Radian 154 154 template <class ToType> 155 struct ConverterFallback< ToType, orxonox::Radian>155 struct ConverterFallback<orxonox::Radian, ToType> 156 156 { 157 157 static bool convert(ToType* output, const orxonox::Radian& input) 158 158 { 159 return convertValue< ToType, Ogre::Real>(output, input.valueRadians());159 return convertValue<Ogre::Real, ToType>(output, input.valueRadians()); 160 160 } 161 161 }; … … 163 163 // From Degree 164 164 template <class ToType> 165 struct ConverterFallback< ToType, orxonox::Degree>165 struct ConverterFallback<orxonox::Degree, ToType> 166 166 { 167 167 static bool convert(ToType* output, const orxonox::Degree& input) 168 168 { 169 return convertValue< ToType, Ogre::Real>(output, input.valueDegrees());169 return convertValue<Ogre::Real, ToType>(output, input.valueDegrees()); 170 170 } 171 171 }; … … 173 173 // To Radian 174 174 template <class FromType> 175 struct ConverterFallback< orxonox::Radian, FromType>175 struct ConverterFallback<FromType, orxonox::Radian> 176 176 { 177 177 static bool convert(orxonox::Radian* output, const FromType& input) … … 190 190 // To Degree 191 191 template <class FromType> 192 struct ConverterFallback< orxonox::Degree, FromType>192 struct ConverterFallback<FromType, orxonox::Degree> 193 193 { 194 194 static bool convert(orxonox::Degree* output, const FromType& input)
Note: See TracChangeset
for help on using the changeset viewer.