Ejemplo 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);
            }
        }
 public void addPosition(AnimationManipulatorStateEntry entry)
 {
     if (positions.ContainsKey(entry.Name))
     {
         positions[entry.Name] = entry;
     }
     else
     {
         positions.Add(entry.Name, entry);
     }
 }
Ejemplo n.º 3
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;
                }
            }
        }
 public void captureFromState(AnimationManipulatorStateEntry state)
 {
     addPosition(state.clone());
 }
 public void addPosition(AnimationManipulatorStateEntry entry)
 {
     positions.Add(entry);
 }