const Urho3D::Matrix3x4 ConfigManager::GetMatrix3x4(const Urho3D::String& section, const Urho3D::String& parameter, const Urho3D::Matrix3x4& defaultValue) { auto value = Get(section, parameter); if (value.GetType() == Urho3D::VAR_MATRIX3X4) return value.GetMatrix3x4(); if (value.GetType() == Urho3D::VAR_STRING) return Urho3D::ToMatrix3x4(value.GetString()); // Parameter doesn't exist, or is a different type if (_saveDefaultParameters) { // Set back to default Set(section, parameter, defaultValue); } return defaultValue; }
template <> Matrix3x4 Variant::Get<Matrix3x4>() const { return GetMatrix3x4(); }
template <> const Matrix3x4& Variant::Get<const Matrix3x4&>() const { return GetMatrix3x4(); }