private Quad2D CreateQuadFromLineSegment (LineSegment2D ls, float TailLen, float HeadLen) { float pitch = ls.Pitch (); Quad2D ret = new Quad2D (); float theta = pitch; ret.a = new TVector2(TailLen * Mathf.Sin(theta) + ls.a.Value.x, -TailLen * Mathf.Cos(theta) + ls.a.Value.y, ls.a.Tag); ret.d = new TVector2(-TailLen * Mathf.Sin(theta) + ls.a.Value.x, TailLen * Mathf.Cos(theta) + ls.a.Value.y, ls.a.Tag); ret.b = new TVector2(HeadLen * Mathf.Sin(theta) + ls.b.Value.x, -HeadLen * Mathf.Cos(theta) + ls.b.Value.y, ls.b.Tag); ret.c = new TVector2(-HeadLen * Mathf.Sin(theta) + ls.b.Value.x, HeadLen * Mathf.Cos(theta) + ls.b.Value.y, ls.b.Tag); return ret; }