mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-30 16:15:33 +00:00
Add base typed B-Spline interpolators
This commit is contained in:
parent
5c6fca14c1
commit
d458c07b36
4 changed files with 57 additions and 0 deletions
|
@ -807,4 +807,30 @@ namespace Nif
|
|||
mBasisData.post(nif);
|
||||
}
|
||||
|
||||
void NiBSplineFloatInterpolator::read(NIFStream* nif)
|
||||
{
|
||||
NiBSplineInterpolator::read(nif);
|
||||
|
||||
nif->read(mValue);
|
||||
nif->read(mHandle);
|
||||
}
|
||||
|
||||
void NiBSplinePoint3Interpolator::read(NIFStream* nif)
|
||||
{
|
||||
NiBSplineInterpolator::read(nif);
|
||||
|
||||
nif->read(mValue);
|
||||
nif->read(mHandle);
|
||||
}
|
||||
|
||||
void NiBSplineTransformInterpolator::read(NIFStream* nif)
|
||||
{
|
||||
NiBSplineInterpolator::read(nif);
|
||||
|
||||
nif->read(mValue);
|
||||
nif->read(mTranslationHandle);
|
||||
nif->read(mRotationHandle);
|
||||
nif->read(mScaleHandle);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -560,5 +560,34 @@ namespace Nif
|
|||
void post(Reader& nif) override;
|
||||
};
|
||||
|
||||
// Abstract
|
||||
struct NiBSplineFloatInterpolator : public NiBSplineInterpolator
|
||||
{
|
||||
float mValue;
|
||||
uint32_t mHandle;
|
||||
|
||||
void read(NIFStream* nif) override;
|
||||
};
|
||||
|
||||
// Abstract
|
||||
struct NiBSplinePoint3Interpolator : public NiBSplineInterpolator
|
||||
{
|
||||
osg::Vec3f mValue;
|
||||
uint32_t mHandle;
|
||||
|
||||
void read(NIFStream* nif) override;
|
||||
};
|
||||
|
||||
struct NiBSplineTransformInterpolator : public NiBSplineInterpolator
|
||||
{
|
||||
NiQuatTransform mValue;
|
||||
uint32_t mTranslationHandle;
|
||||
uint32_t mRotationHandle;
|
||||
uint32_t mScaleHandle;
|
||||
|
||||
void read(NIFStream* nif) override;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -164,6 +164,7 @@ namespace Nif
|
|||
{ "NiLightRadiusController", &construct<NiFloatInterpController, RC_NiLightRadiusController> },
|
||||
|
||||
// Interpolators, Gamebryo
|
||||
{ "NiBSplineTransformInterpolator", &construct<NiBSplineTransformInterpolator, RC_NiBSplineTransformInterpolator> },
|
||||
{ "NiBlendBoolInterpolator", &construct<NiBlendBoolInterpolator, RC_NiBlendBoolInterpolator> },
|
||||
{ "NiBlendFloatInterpolator", &construct<NiBlendFloatInterpolator, RC_NiBlendFloatInterpolator> },
|
||||
{ "NiBlendPoint3Interpolator", &construct<NiBlendPoint3Interpolator, RC_NiBlendPoint3Interpolator> },
|
||||
|
|
|
@ -164,6 +164,7 @@ namespace Nif
|
|||
RC_NiBSParticleNode,
|
||||
RC_NiBSplineData,
|
||||
RC_NiBSplineBasisData,
|
||||
RC_NiBSplineTransformInterpolator,
|
||||
RC_NiCamera,
|
||||
RC_NiClusterAccumulator,
|
||||
RC_NiCollisionObject,
|
||||
|
|
Loading…
Reference in a new issue