Beispiel #1
0
    public void UpdateRenderer(List <Vector2> points)
    {
        _vertices.Clear();

        InlineAreaRendererHelper helper = new InlineAreaRendererHelper(points, _vertices);

        helper.Execute();

        SetVerticesDirty();
    }
    void SplitCurve()
    {
        int            count       = _points.Count - beneathIndex - 1;
        List <Vector2> newLeftList = new List <Vector2>(_points);

        newLeftList.RemoveRange(beneathIndex + 1, count);
        newLeftList.Insert(0, newLeftPoint);

        InlineAreaRendererHelper helperLeft = new InlineAreaRendererHelper(newLeftList, Vertices);

        helperLeft.Execute();

        _points.RemoveRange(0, beneathIndex);
        _points.Add(newRightPoint);
        List <Vector2>           newRightList = new List <Vector2>(_points);
        InlineAreaRendererHelper calRight     = new InlineAreaRendererHelper(newRightList, Vertices);

        calRight.Execute();
    }