public static Matrix4x4 CalculateOffsets(float weight, Vector3 positionExtent, Vector3 rotationExtent, Vector3 scaleExtent) { return(Matrix4x4.TRS( TransformEffect.CalculatePositionOffset(weight, positionExtent), TransformEffect.CalculateRotationOffset(weight, rotationExtent), Vector3.one + TransformEffect.CalculateScaleOffset(weight, scaleExtent))); }
public bool CompareTo(TransformEffect target) { return(Mathf.Approximately(target.duration, this.duration) && target.timeWrap == this.timeWrap && target.positionExtent == this.positionExtent && target.rotationExtent == this.rotationExtent && target.scaleExtent == this.scaleExtent); }
public void SetTo(TransformEffect target) { target.duration = this.duration; target.timeWrap = this.timeWrap; target.positionExtent = this.positionExtent; target.rotationExtent = this.rotationExtent; target.scaleExtent = this.scaleExtent; target.Preset = TransformEffectPreset.Custom; }
protected override Matrix4x4 Internal_CalculateState(float weight) { return(TransformEffect.CalculateOffsets(weight, this.positionExtent, this.rotationExtent, this.scaleExtent)); }
protected override void ProcessEffect(float weight) { this.PositionOffset = TransformEffect.CalculatePositionOffset(weight, this.positionExtent * this.strength); this.RotationOffset = TransformEffect.CalculateRotationOffset(weight, this.rotationExtent * this.strength); this.ScaleOffset = TransformEffect.CalculateScaleOffset(weight, this.scaleExtent * this.strength); }