mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 15:29:55 +00:00
Add compact B-Spline interpolators
This commit is contained in:
parent
d458c07b36
commit
c647374c0d
4 changed files with 67 additions and 1 deletions
|
@ -815,6 +815,14 @@ namespace Nif
|
|||
nif->read(mHandle);
|
||||
}
|
||||
|
||||
void NiBSplineCompFloatInterpolator::read(NIFStream* nif)
|
||||
{
|
||||
NiBSplineFloatInterpolator::read(nif);
|
||||
|
||||
nif->read(mOffset);
|
||||
nif->read(mHalfRange);
|
||||
}
|
||||
|
||||
void NiBSplinePoint3Interpolator::read(NIFStream* nif)
|
||||
{
|
||||
NiBSplineInterpolator::read(nif);
|
||||
|
@ -823,6 +831,14 @@ namespace Nif
|
|||
nif->read(mHandle);
|
||||
}
|
||||
|
||||
void NiBSplineCompPoint3Interpolator::read(NIFStream* nif)
|
||||
{
|
||||
NiBSplinePoint3Interpolator::read(nif);
|
||||
|
||||
nif->read(mOffset);
|
||||
nif->read(mHalfRange);
|
||||
}
|
||||
|
||||
void NiBSplineTransformInterpolator::read(NIFStream* nif)
|
||||
{
|
||||
NiBSplineInterpolator::read(nif);
|
||||
|
@ -833,4 +849,16 @@ namespace Nif
|
|||
nif->read(mScaleHandle);
|
||||
}
|
||||
|
||||
void NiBSplineCompTransformInterpolator::read(NIFStream* nif)
|
||||
{
|
||||
NiBSplineTransformInterpolator::read(nif);
|
||||
|
||||
nif->read(mTranslationOffset);
|
||||
nif->read(mTranslationHalfRange);
|
||||
nif->read(mRotationOffset);
|
||||
nif->read(mRotationHalfRange);
|
||||
nif->read(mScaleOffset);
|
||||
nif->read(mScaleHalfRange);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -569,6 +569,14 @@ namespace Nif
|
|||
void read(NIFStream* nif) override;
|
||||
};
|
||||
|
||||
struct NiBSplineCompFloatInterpolator : public NiBSplineFloatInterpolator
|
||||
{
|
||||
float mOffset;
|
||||
float mHalfRange;
|
||||
|
||||
void read(NIFStream* nif) override;
|
||||
};
|
||||
|
||||
// Abstract
|
||||
struct NiBSplinePoint3Interpolator : public NiBSplineInterpolator
|
||||
{
|
||||
|
@ -578,6 +586,14 @@ namespace Nif
|
|||
void read(NIFStream* nif) override;
|
||||
};
|
||||
|
||||
struct NiBSplineCompPoint3Interpolator : public NiBSplinePoint3Interpolator
|
||||
{
|
||||
float mOffset;
|
||||
float mHalfRange;
|
||||
|
||||
void read(NIFStream* nif) override;
|
||||
};
|
||||
|
||||
struct NiBSplineTransformInterpolator : public NiBSplineInterpolator
|
||||
{
|
||||
NiQuatTransform mValue;
|
||||
|
@ -588,6 +604,18 @@ namespace Nif
|
|||
void read(NIFStream* nif) override;
|
||||
};
|
||||
|
||||
struct NiBSplineCompTransformInterpolator : public NiBSplineTransformInterpolator
|
||||
{
|
||||
float mTranslationOffset;
|
||||
float mTranslationHalfRange;
|
||||
float mRotationOffset;
|
||||
float mRotationHalfRange;
|
||||
float mScaleOffset;
|
||||
float mScaleHalfRange;
|
||||
|
||||
void read(NIFStream* nif) override;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -164,7 +164,14 @@ namespace Nif
|
|||
{ "NiLightRadiusController", &construct<NiFloatInterpController, RC_NiLightRadiusController> },
|
||||
|
||||
// Interpolators, Gamebryo
|
||||
{ "NiBSplineTransformInterpolator", &construct<NiBSplineTransformInterpolator, RC_NiBSplineTransformInterpolator> },
|
||||
{ "NiBSplineCompFloatInterpolator",
|
||||
&construct<NiBSplineCompFloatInterpolator, RC_NiBSplineCompFloatInterpolator> },
|
||||
{ "NiBSplineCompPoint3Interpolator",
|
||||
&construct<NiBSplineCompPoint3Interpolator, RC_NiBSplineCompPoint3Interpolator> },
|
||||
{ "NiBSplineCompTransformInterpolator",
|
||||
&construct<NiBSplineCompTransformInterpolator, RC_NiBSplineCompTransformInterpolator> },
|
||||
{ "NiBSplineTransformInterpolator",
|
||||
&construct<NiBSplineTransformInterpolator, RC_NiBSplineTransformInterpolator> },
|
||||
{ "NiBlendBoolInterpolator", &construct<NiBlendBoolInterpolator, RC_NiBlendBoolInterpolator> },
|
||||
{ "NiBlendFloatInterpolator", &construct<NiBlendFloatInterpolator, RC_NiBlendFloatInterpolator> },
|
||||
{ "NiBlendPoint3Interpolator", &construct<NiBlendPoint3Interpolator, RC_NiBlendPoint3Interpolator> },
|
||||
|
|
|
@ -164,6 +164,9 @@ namespace Nif
|
|||
RC_NiBSParticleNode,
|
||||
RC_NiBSplineData,
|
||||
RC_NiBSplineBasisData,
|
||||
RC_NiBSplineCompFloatInterpolator,
|
||||
RC_NiBSplineCompPoint3Interpolator,
|
||||
RC_NiBSplineCompTransformInterpolator,
|
||||
RC_NiBSplineTransformInterpolator,
|
||||
RC_NiCamera,
|
||||
RC_NiClusterAccumulator,
|
||||
|
|
Loading…
Reference in a new issue