예제 #1
0
 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)));
 }
예제 #2
0
 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);
 }
예제 #3
0
            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;
            }
예제 #4
0
 protected override Matrix4x4 Internal_CalculateState(float weight)
 {
     return(TransformEffect.CalculateOffsets(weight, this.positionExtent, this.rotationExtent, this.scaleExtent));
 }
예제 #5
0
 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);
 }