Exemplo n.º 1
0
        public void blend(AnimationManipulatorStateEntry target, float percent)
        {
            BoneScalarStateEntry rotateTarget = target as BoneScalarStateEntry;
            BoneScalar           bone         = AnimationManipulatorController.getManipulator(name) as BoneScalar;

            if (bone != null)
            {
                bone.Scale = scale.lerp(ref rotateTarget.scale, ref percent);
            }
        }
Exemplo n.º 2
0
        public void blend(AnimationManipulatorStateEntry target, float percent)
        {
            PoseManipulatorStateEntry poseTarget = target as PoseManipulatorStateEntry;
            float           start = position;
            float           end   = poseTarget.position;
            float           delta = end - start;
            PoseManipulator bone  = AnimationManipulatorController.getManipulator(name) as PoseManipulator;

            if (bone != null)
            {
                bone.Position = start + delta * percent;
            }
        }
        public void blend(AnimationManipulatorStateEntry target, float percent)
        {
            BoneRotatorStateEntry rotateTarget = target as BoneRotatorStateEntry;
            Quaternion            blendRot     = rotation.slerp(ref rotateTarget.rotation, percent);
            BoneRotator           bone         = AnimationManipulatorController.getManipulator(name) as BoneRotator;

            if (bone != null)
            {
                if (blendRot.isNumber())
                {
                    bone.Rotation = blendRot;
                }
                else
                {
                    bone.Rotation = rotateTarget.rotation;
                }
            }
        }
Exemplo n.º 4
0
 /// <summary>
 /// Get the AnimationManipultor attached to this Mandible with the given
 /// name. Will return null if the manipulator does not exist.
 /// </summary>
 /// <param name="name">The name of the manipultor.</param>
 /// <returns>The attached AnimationManipulator or null if it does not exist.</returns>
 public AnimationManipulator getAnimationManipulator(String name)
 {
     return(AnimationManipulatorController.getManipulator(name));
     //return Owner.getElement(name) as AnimationManipulator;
 }