Beispiel #1
0
    public static RectangleModel StartNewRectangle(Vec <Coordinate> focusPosition,
                                                   GeometryStyleAsset.GeometryColor color)
    {
        var nextRectangle = new RectangleModel {
            P0 = focusPosition, Color = color
        };

        focusPosition.ForEach(c => c.AddAttachedGeometry(nextRectangle));
        return(nextRectangle);
    }
Beispiel #2
0
    public static LineModel StartNewLine(
        Vec <Coordinate> focusPosition)
    {
        var nextLine = new LineModel {
            P0 = focusPosition
        };

        focusPosition.ForEach(c => c.AddAttachedGeometry(nextLine));
        return(nextLine);
    }
Beispiel #3
0
    public static PointModel NewPoint(
        Vec <Coordinate> focusPosition)
    {
        var nextPoint = new PointModel {
            P0 = focusPosition, IsBaked = true
        };

        focusPosition.ForEach(c => c.AddAttachedGeometry(nextPoint));
        return(nextPoint);
    }
Beispiel #4
0
    public static Vec <Coordinate> UpdateCursorPosition(Vec <Coordinate> oldFocusPosition,
                                                        CoordinateSystem cs, KeyboardInput.Model keyboardInput)
    {
        oldFocusPosition?.ForEach(c =>
        {
            if (c.IsCurrentlyDrawn)
            {
                c.Delete();
            }
        });

        return(GetOrCreatePositionAtMousePosition(cs, cs.Anchor, true, keyboardInput));
    }
Beispiel #5
0
 public static void BakePosition(Vec <Coordinate> modelFocusPosition)
 {
     modelFocusPosition.ForEach(c => c.Bake());
 }