예제 #1
0
    public void OnRenderObject()
    {
        if (drawSlicer == false)
        {
            return;
        }

        if (mouseDown)
        {
            Max2D.SetBorder(true);
            Max2D.SetLineMode(Max2D.LineMode.Smooth);
            Max2D.SetLineWidth(lineWidth * .5f);
            Max2D.SetColor(slicerColor);

            Max2DLegacy.DrawLineSquare(pair.A, 0.5f, zPosition);
            Max2DLegacy.DrawLineSquare(pair.B, 0.5f, zPosition);
            Max2DLegacy.DrawLine(pair.A, pair.B, zPosition);
        }
    }
    public void OnRenderObject()
    {
        if (drawSlicer == false)
        {
            return;
        }

        if (mouseDown)
        {
            Max2D.SetBorder(true);
            Max2D.SetLineMode(Max2D.LineMode.Smooth);
            Max2D.SetLineWidth(lineWidth * .5f);
            Max2D.SetColor(slicerColor);

            if (points.Count > 0)
            {
                Max2DLegacy.DrawStrippedLine(points, minVertexDistance, zPosition);
                Max2DLegacy.DrawLineSquare(points.Last(), 0.5f, zPosition);
                Max2DLegacy.DrawLineSquare(points.First(), 0.5f, zPosition);
            }
        }
    }