Пример #1
0
 static DeferredLine()
 {
     deferredLineArray = new DeferredLine[size];
     for (int i = 0; i < size; i++)
     {
         deferredLineArray[i] = new DeferredLine();
     }
 }
Пример #2
0
 public static void DrawLine(Vector3 startPoint, Vector3 endPoint, Color color)
 {
     if (Demo.IsDrawPhase == true)
     {
         iDrawLine(startPoint, endPoint, color);
     }
     else
     {
         DeferredLine.AddToBuffer(startPoint, endPoint, color);
     }
 }
Пример #3
0
        public static void DrawAll()
        {
            // draw all lines in the buffer
            for (int i = 0; i < index; i++)
            {
                DeferredLine dl = deferredLineArray[i];
                Drawing.iDrawLine(dl.startPoint, dl.endPoint, dl.color);
            }

            // reset buffer index
            index = 0;
        }
Пример #4
0
        // draw a line with alpha blending
        public static void DrawLineAlpha(Vector3 startPoint, Vector3 endPoint, Color color, float alpha)
        {
            Color c = new Color(color.R, color.G, color.B, (byte)(255.0f * alpha));

            if (Demo.IsDrawPhase == true)
            {
                iDrawLine(startPoint, endPoint, c);
            }
            else
            {
                DeferredLine.AddToBuffer(startPoint, endPoint, c);
            }
        }
Пример #5
0
 public static void AllDeferredLines()
 {
     DeferredLine.DrawAll();
 }
Пример #6
0
 static DeferredLine()
 {
     deferredLineArray = new DeferredLine[size];
     for (int i = 0; i < size; i++)
     {
         deferredLineArray[i] = new DeferredLine();
     }
 }