private ShadowTransform[] BlendController( ShadowController controller, ShadowTransform[] input, Slider weight, FilterList <string> filter = null) { if (weight.IsMin == true) { return(input); } // Update the target controller from that blend if (filter == null) { controller.Decode(input); } else { controller.Decode(input, filter); } controller.ControlledUpdate(); ShadowTransform[] result = controller.Encode(this.NewTransformArray()); return(BlendSystem.Blend( this.NewTransformArray(), new BlendPair(input, weight.Inverse), new BlendPair(result, weight.Value))); }
void Update() { UpdateCoordinates(); UpdateInterpolation(); // Project the idle controller onto the headLook controller // each frame, since the headLook controller calculates a full // offset each frame from the base pose to the gazing pose headlookController.Decode( this.dummyController.Encode( this.NewTransformArray())); this.headlookController.ControlledUpdate(); ShadowTransform[] dummy = dummyController.Encode(this.NewTransformArray()); ShadowTransform[] headLook = this.headlookController.Encode(this.NewTransformArray()); ShadowTransform[] blend = BlendSystem.Blend( this.NewTransformArray(), new BlendPair(headLook, interp), new BlendPair(dummy, 1.0f - interp)); Shadow.ReadShadowData(blend, transform.GetChild(0), this); }
private ShadowTransform[] BlendController( ShadowController controller, ShadowTransform[] input, Slider weight, FilterList<string> filter = null) { if (weight.IsMin == true) return input; // Update the target controller from that blend if (filter == null) controller.Decode(input); else controller.Decode(input, filter); controller.ControlledUpdate(); ShadowTransform[] result = controller.Encode(this.NewTransformArray()); return BlendSystem.Blend( this.NewTransformArray(), new BlendPair(input, weight.Inverse), new BlendPair(result, weight.Value)); }