Ejemplo n.º 1
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);
        }
 /// <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());
 }
 /// <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);
 }
        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);
        }