示例#1
0
    const Urho3D::Matrix4 ConfigManager::GetMatrix4(const Urho3D::String& section, const Urho3D::String& parameter, const Urho3D::Matrix4& defaultValue)
    {
        auto value = Get(section, parameter);

        if (value.GetType() == Urho3D::VAR_MATRIX4)
            return value.GetMatrix4();

        if (value.GetType() == Urho3D::VAR_STRING)
            return Urho3D::ToMatrix4(value.GetString());

        // Parameter doesn't exist, or is a different type
        if (_saveDefaultParameters)
        {
            // Set back to default
            Set(section, parameter, defaultValue);
        }

        return defaultValue;
    }
示例#2
0
template <> Matrix4 Variant::Get<Matrix4>() const
{
    return GetMatrix4();
}
示例#3
0
template <> const Matrix4& Variant::Get<const Matrix4&>() const
{
    return GetMatrix4();
}