Пример #1
0
    public void drawTexture(List <Vector3> drawPoints)
    {
        for (int j = 0; j < drawPoints.Count() - 1; j++)
        {
            int x1 = (int)ExtensionMethods.Remap(drawPoints[j].x, -470, 470, 0, textureWidth);
            int y1 = (int)ExtensionMethods.Remap(drawPoints[j].y, -300, 300, 0, textureHeight);

            int x2 = (int)ExtensionMethods.Remap(drawPoints[j + 1].x, -470, 470, 0, textureWidth);
            int y2 = (int)ExtensionMethods.Remap(drawPoints[j + 1].y, -300, 300, 0, textureHeight);


            TexturePainter.rasterizeBresenham(x1, y1, x2, y2, texture);
            //TexturePainter.plotLineAA(x1, y1, x2, y2, brushSize, texture);
        }
    }