예제 #1
0
    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;
    }
예제 #2
0
파일: Variant.cpp 프로젝트: gogoprog/Urho3D
template <> Matrix3x4 Variant::Get<Matrix3x4>() const
{
    return GetMatrix3x4();
}
예제 #3
0
파일: Variant.cpp 프로젝트: gogoprog/Urho3D
template <> const Matrix3x4& Variant::Get<const Matrix3x4&>() const
{
    return GetMatrix3x4();
}