mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 15:35:23 +00:00
check ValueTs
This commit is contained in:
parent
d8897c4509
commit
94c89e6d5e
@ -60,11 +60,20 @@ namespace NifOsg
|
||||
|
||||
ValueInterpolator() = default;
|
||||
|
||||
template<class T = MapT>
|
||||
ValueInterpolator(typename std::enable_if_t<
|
||||
std::is_same<T, Nif::FloatKeyMap>::value,
|
||||
const Nif::NiFloatInterpolator
|
||||
> * interpolator) : mDefaultVal(interpolator->defaultVal)
|
||||
template<
|
||||
class T,
|
||||
typename = std::enable_if_t<
|
||||
std::conjunction_v<
|
||||
std::disjunction<
|
||||
std::is_same<ValueT, float>,
|
||||
std::is_same<ValueT, osg::Vec3f>
|
||||
>,
|
||||
std::is_same<decltype(T::defaultVal), ValueT>
|
||||
>,
|
||||
T
|
||||
>
|
||||
>
|
||||
ValueInterpolator(const T* interpolator) : mDefaultVal(interpolator->defaultVal)
|
||||
{
|
||||
if (interpolator->data.empty())
|
||||
return;
|
||||
@ -76,22 +85,6 @@ namespace NifOsg
|
||||
}
|
||||
};
|
||||
|
||||
template<class T = MapT>
|
||||
ValueInterpolator(typename std::enable_if_t<
|
||||
std::is_same<T, Nif::Vector3KeyMap>::value,
|
||||
const Nif::NiPoint3Interpolator
|
||||
> * interpolator) : mDefaultVal(interpolator->defaultVal)
|
||||
{
|
||||
if (interpolator->data.empty())
|
||||
return;
|
||||
mKeys = interpolator->data->mKeyList;
|
||||
if (mKeys)
|
||||
{
|
||||
mLastLowKey = mKeys->mKeys.end();
|
||||
mLastHighKey = mKeys->mKeys.end();
|
||||
}
|
||||
}
|
||||
|
||||
ValueInterpolator(std::shared_ptr<const MapT> keys, ValueT defaultVal = ValueT())
|
||||
: mKeys(keys)
|
||||
, mDefaultVal(defaultVal)
|
||||
|
Loading…
x
Reference in New Issue
Block a user