42 lines
1016 B
C#
42 lines
1016 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
namespace ProBuilder2.Common
|
|
{
|
|
// Token: 0x02000053 RID: 83
|
|
public class pb_Transform2D
|
|
{
|
|
// Token: 0x06000282 RID: 642 RVA: 0x0001F799 File Offset: 0x0001DB99
|
|
public pb_Transform2D(Vector2 position, float rotation, Vector2 scale)
|
|
{
|
|
this.position = position;
|
|
this.rotation = rotation;
|
|
this.scale = scale;
|
|
}
|
|
|
|
// Token: 0x06000283 RID: 643 RVA: 0x0001F7B6 File Offset: 0x0001DBB6
|
|
public Vector2 TransformPoint(Vector2 p)
|
|
{
|
|
p += this.position;
|
|
p.RotateAroundPoint(p, this.rotation);
|
|
p.ScaleAroundPoint(p, this.scale);
|
|
return p;
|
|
}
|
|
|
|
// Token: 0x06000284 RID: 644 RVA: 0x0001F7E4 File Offset: 0x0001DBE4
|
|
public override string ToString()
|
|
{
|
|
return string.Concat(new object[] { "T: ", this.position, "\nR: ", this.rotation, '°', "\nS: ", this.scale });
|
|
}
|
|
|
|
// Token: 0x040001C6 RID: 454
|
|
public Vector2 position;
|
|
|
|
// Token: 0x040001C7 RID: 455
|
|
public float rotation;
|
|
|
|
// Token: 0x040001C8 RID: 456
|
|
public Vector2 scale;
|
|
}
|
|
}
|