public override float getKeyFramesAtTime(TimeIndex timeIndex, out KeyFrame keyFrame1, out KeyFrame keyFrame2, out ushort firstKeyIndex)
        {
            IntPtr kf1, kf2;
            float  retVal = VertexAnimationTrack_getKeyFramesAtTime2(animationTrack, timeIndex.getTimePos(), timeIndex.getKeyIndex(), out kf1, out kf2, out firstKeyIndex);

            switch (VertexAnimationTrack_getAnimationType(animationTrack))
            {
            case VertexAnimationType.VAT_MORPH:
                keyFrame1 = morphKeyFrames.getObject(kf1);
                keyFrame2 = morphKeyFrames.getObject(kf2);
                break;

            case VertexAnimationType.VAT_POSE:
                keyFrame1 = poseKeyFrames.getObject(kf1);
                keyFrame2 = poseKeyFrames.getObject(kf2);
                break;

            default:
                keyFrame1 = null;
                keyFrame2 = null;
                throw new NotImplementedException();
            }
            return(retVal);
        }
Пример #2
0
        public override float getKeyFramesAtTime(TimeIndex timeIndex, out KeyFrame keyFrame1, out KeyFrame keyFrame2, out ushort firstKeyIndex)
        {
            IntPtr kf1, kf2;
            float  retVal = NodeAnimationTrack_getKeyFramesAtTime2(animationTrack, timeIndex.getTimePos(), timeIndex.getKeyIndex(), out kf1, out kf2, out firstKeyIndex);

            keyFrame1 = keyFrames.getObject(kf1);
            keyFrame2 = keyFrames.getObject(kf2);
            return(retVal);
        }
Пример #3
0
 /// <summary>
 /// Gets the 2 KeyFrame objects which are active at the time given, and the
 /// blend value between them.
 /// <para>
 /// At any point in time in an animation, there are either 1 or 2 keyframes
 /// which are 'active', 1 if the time index is exactly on a keyframe, 2 at
 /// all other times i.e. the keyframe before and the keyframe after.
 /// </para>
 /// <para>
 /// This method returns those keyframes given a time index, and also returns
 /// a parametric value indicating the value of 't' representing where the
 /// time index falls between them. E.g. if it returns 0, the time index is
 /// exactly on keyFrame1, if it returns 0.5 it is half way between keyFrame1
 /// and keyFrame2 etc.
 /// </para>
 /// </summary>
 /// <param name="timeIndex">The time index.</param>
 /// <param name="keyFrame1">Pointer to a KeyFrame pointer which will receive the pointer to the keyframe just before or at this time index.</param>
 /// <param name="keyFrame2">Pointer to a KeyFrame pointer which will receive the pointer to the keyframe just after this time index.</param>
 /// <returns>Parametric value indicating how far along the gap between the 2 keyframes the timeIndex value is, e.g. 0.0 for exactly at 1, 0.25 for a quarter etc. By definition the range of this value is: 0.0 &lt;= returnValue &lt; 1.0.</returns>
 public abstract float getKeyFramesAtTime(TimeIndex timeIndex, out KeyFrame keyFrame1, out KeyFrame keyFrame2, out ushort firstKeyIndex);
Пример #4
0
 /// <summary>
 /// <para>
 /// Gets the 2 KeyFrame objects which are active at the time given, and the
 /// blend value between them.
 /// </para>
 /// <para>
 /// At any point in time in an animation, there are either 1 or 2 keyframes
 /// which are 'active', 1 if the time index is exactly on a keyframe, 2 at
 /// all other times i.e. the keyframe before and the keyframe after.
 /// </para>
 /// <para>
 /// This method returns those keyframes given a time index, and also returns
 /// a parametric value indicating the value of 't' representing where the
 /// time index falls between them. E.g. if it returns 0, the time index is
 /// exactly on keyFrame1, if it returns 0.5 it is half way between keyFrame1
 /// and keyFrame2 etc.
 /// </para>
 /// </summary>
 /// <param name="timeIndex">The time index.</param>
 /// <param name="keyFrame1">Pointer to a KeyFrame pointer which will receive the pointer to the keyframe just before or at this time index.</param>
 /// <param name="keyFrame2">Pointer to a KeyFrame pointer which will receive the pointer to the keyframe just after this time index.</param>
 /// <returns>Parametric value indicating how far along the gap between the 2 keyframes the timeIndex value is, e.g. 0.0 for exactly at 1, 0.25 for a quarter etc. By definition the range of this value is: 0.0 &lt;= returnValue &lt; 1.0.</returns>
 public abstract float getKeyFramesAtTime(TimeIndex timeIndex, out KeyFrame keyFrame1, out KeyFrame keyFrame2);
 public override float getKeyFramesAtTime(TimeIndex timeIndex, out KeyFrame keyFrame1, out KeyFrame keyFrame2, out ushort firstKeyIndex)
 {
     throw new NotImplementedException();
 }