|
|
|
|
|
|
|
|
|
|
namespace Unity.UIWidgets.ui { |
|
|
|
public partial struct uiMatrix3 { |
|
|
|
public uiOffset[] mapPoints(uiOffset[] dst, uiOffset[] src) { |
|
|
|
public void mapPoints(ref uiOffset[] dst, ref uiOffset[] src) { |
|
|
|
return this._getMapPtsProc()(this, dst, src, src.Length); |
|
|
|
this._getMapPtsProc()(this, ref dst, ref src, src.Length); |
|
|
|
public uiOffset[] mapPoints(uiOffset[] pts) { |
|
|
|
return this.mapPoints(pts, pts); |
|
|
|
public void mapPoints(ref uiOffset[] pts) { |
|
|
|
this.mapPoints(ref pts, ref pts); |
|
|
|
delegate uiOffset[] MapPtsProc(uiMatrix3 mat, uiOffset[] dst, uiOffset[] src, int count); |
|
|
|
delegate void MapPtsProc(uiMatrix3 mat, ref uiOffset[] dst, ref uiOffset[] src, int count); |
|
|
|
|
|
|
|
static readonly MapPtsProc[] gMapPtsProcs = { |
|
|
|
Identity_pts, Trans_pts, |
|
|
|
|
|
|
return GetMapPtsProc(this._getType()); |
|
|
|
} |
|
|
|
|
|
|
|
static uiOffset[] Identity_pts(uiMatrix3 m, uiOffset[] dst, uiOffset[] src, int count) { |
|
|
|
static void Identity_pts(uiMatrix3 m, ref uiOffset[] dst, ref uiOffset[] src, int count) { |
|
|
|
|
|
|
|
return dst; |
|
|
|
static uiOffset[] Trans_pts(uiMatrix3 m, uiOffset[] dst, uiOffset[] src, int count) { |
|
|
|
static void Trans_pts(uiMatrix3 m, ref uiOffset[] dst, ref uiOffset[] src, int count) { |
|
|
|
D.assert(m._getType() <= TypeMask.kTranslate_Mask); |
|
|
|
if (count > 0) { |
|
|
|
var tx = m.getTranslateX(); |
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return dst; |
|
|
|
static uiOffset[] Scale_pts(uiMatrix3 m, uiOffset[] dst, uiOffset[] src, int count) { |
|
|
|
static void Scale_pts(uiMatrix3 m, ref uiOffset[] dst, ref uiOffset[] src, int count) { |
|
|
|
D.assert(m._getType() <= (TypeMask.kScale_Mask | TypeMask.kTranslate_Mask)); |
|
|
|
if (count > 0) { |
|
|
|
var tx = m.getTranslateX(); |
|
|
|
|
|
|
dst[i] = new uiOffset(src[i].dx * sx + tx, src[i].dy * sy + ty); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return dst; |
|
|
|
static uiOffset[] Persp_pts(uiMatrix3 m, uiOffset[] dst, uiOffset[] src, int count) { |
|
|
|
static void Persp_pts(uiMatrix3 m, ref uiOffset[] dst, ref uiOffset[] src, int count) { |
|
|
|
D.assert(m._hasPerspective()); |
|
|
|
|
|
|
|
if (count > 0) { |
|
|
|
|
|
|
dst[i] = new uiOffset(x * z, y * z); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return dst; |
|
|
|
static uiOffset[] Affine_pts(uiMatrix3 m, uiOffset[] dst, uiOffset[] src, int count) { |
|
|
|
static void Affine_pts(uiMatrix3 m, ref uiOffset[] dst, ref uiOffset[] src, int count) { |
|
|
|
D.assert(m._getType() != TypeMask.kPerspective_Mask); |
|
|
|
if (count > 0) { |
|
|
|
var tx = m.getTranslateX(); |
|
|
|
|
|
|
src[i].dx * ky + src[i].dy * sy + ty); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return dst; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|