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); }
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); }
/// <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 <= returnValue < 1.0.</returns> public abstract float getKeyFramesAtTime(TimeIndex timeIndex, out KeyFrame keyFrame1, out KeyFrame keyFrame2, out ushort firstKeyIndex);
/// <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 <= returnValue < 1.0.</returns> public abstract float getKeyFramesAtTime(TimeIndex timeIndex, out KeyFrame keyFrame1, out KeyFrame keyFrame2);
/// <summary> /// Applies an animation track to the designated target. /// </summary> /// <param name="timeIndex">The time position in the animation to apply. </param> /// <param name="weight">The influence to give to this track, 1.0 for full influence, less to blend with other animations.</param> public void apply(TimeIndex timeIndex, float weight) { VertexAnimationTrack_apply2(animationTrack, timeIndex.getTimePos(), timeIndex.getKeyIndex(), weight); }
/// <summary> /// Applies an animation track to the designated target. /// </summary> /// <param name="timeIndex">The time position in the animation to apply. </param> public void apply(TimeIndex timeIndex) { VertexAnimationTrack_apply1(animationTrack, timeIndex.getTimePos(), timeIndex.getKeyIndex()); }
public override float getKeyFramesAtTime(TimeIndex timeIndex, out KeyFrame keyFrame1, out KeyFrame keyFrame2, out ushort firstKeyIndex) { throw new NotImplementedException(); }