Flood.GUI.GUIGeometryBuffer.InitVetexes C# (CSharp) Method

InitVetexes() private method

private InitVetexes ( Vertex &v1, Vertex &v2, Vertex &v3, Vertex &v4, RectangleF rect, System.Color color, System.Vector2 topLeftUV, System.Vector2 topRightUV, System.Vector2 bottomRightUV, System.Vector2 bottomLeftUV ) : void
v1 Vertex
v2 Vertex
v3 Vertex
v4 Vertex
rect RectangleF
color System.Color
topLeftUV System.Vector2
topRightUV System.Vector2
bottomRightUV System.Vector2
bottomLeftUV System.Vector2
return void
        private void InitVetexes(out Vertex v1, out Vertex v2, out Vertex v3, out Vertex v4,
            RectangleF rect , Color color,
            Vector2 topLeftUV, Vector2 topRightUV, Vector2 bottomRightUV, Vector2 bottomLeftUV)
        {
            var top = Math.Max(rect.GetBottom(), rect.GetTop());
            var bottom = Math.Min(rect.GetBottom(), rect.GetTop());
            var left = rect.GetLeft();
            var right = rect.GetRight();

            v1.Position = new Vector3(left, bottom, zCounter.Value);
            v2.Position = new Vector3(right, bottom, zCounter.Value);
            v3.Position = new Vector3(right, top, zCounter.Value);
            v4.Position = new Vector3(left, top, zCounter.Value);

            zCounter.Increment();

            v1.shift = left  - ((int)left);
            v2.shift = right - ((int)right);
            v3.shift = right - ((int)right);
            v4.shift = left  - ((int)left);

            v1.Color = color;
            v2.Color = color;
            v3.Color = color;
            v4.Color = color;

            v1.UV = topLeftUV;
            v2.UV = topRightUV;
            v3.UV = bottomRightUV;
            v4.UV = bottomLeftUV;
        }