Example #1
0
 private static Keyframe CreateKeyframe(W3dAnimationChannelType channelType, TimeSpan time, ref W3dAnimationChannelDatum datum)
 {
     return(new Keyframe(time, CreateKeyframeValue(channelType, ref datum)));
 }
Example #2
0
        private static KeyframeValue CreateKeyframeValue(W3dAnimationChannelType channelType, ref W3dAnimationChannelDatum datum)
        {
            switch (channelType)
            {
            case W3dAnimationChannelType.Quaternion:
                return(new KeyframeValue {
                    Quaternion = datum.Quaternion
                });

            case W3dAnimationChannelType.TranslationX:
            case W3dAnimationChannelType.TranslationY:
            case W3dAnimationChannelType.TranslationZ:
                return(new KeyframeValue {
                    FloatValue = datum.FloatValue
                });

            default:
                throw new NotImplementedException();
            }
        }
Example #3
0
        private static Keyframe CreateKeyframe(W3dAnimationChannelType channelType, TimeSpan time, ref W3dAnimationChannelDatum datum)
        {
            switch (channelType)
            {
            case W3dAnimationChannelType.Quaternion:
                return(new QuaternionKeyframe(time, datum.Quaternion));

            case W3dAnimationChannelType.TranslationX:
                return(new TranslationXKeyframe(time, datum.FloatValue));

            case W3dAnimationChannelType.TranslationY:
                return(new TranslationYKeyframe(time, datum.FloatValue));

            case W3dAnimationChannelType.TranslationZ:
                return(new TranslationZKeyframe(time, datum.FloatValue));

            default:
                throw new NotImplementedException();
            }
        }