private void lineSketchObjectTest()
    {
        strokeSketchObject.AddControlPoint(new Vector3(-2, 1, 0));
        strokeSketchObject.AddControlPoint(Vector3.one);
        strokeSketchObject.AddControlPoint(new Vector3(2, 2, 0));
        strokeSketchObject.AddControlPoint(new Vector3(2, 1, 0));

        strokeSketchObject.SetStrokeDiameter(.7f);

        //StartCoroutine(changeDiameter());

        strokeSketchObject2.AddControlPoint(new Vector3(1, 0, 0));
        strokeSketchObject2.AddControlPoint(new Vector3(2, 1, 1));
        strokeSketchObject2.AddControlPoint(new Vector3(3, 2, 0));
        strokeSketchObject2.AddControlPoint(new Vector3(3, 1, 0));

        //GameObject selectionGO = new GameObject("sketchObjectSelection", typeof(SketchObjectSelection));
        GameObject            selectionGO = Instantiate(selectionPrefab);
        GameObject            groupGO     = new GameObject("sketchObjectGroup", typeof(SketchObjectGroup));
        SketchObjectSelection selection   = selectionGO.GetComponent <SketchObjectSelection>();

        selection.AddToSelection(strokeSketchObject);
        selection.AddToSelection(strokeSketchObject2);
        selection.Activate();
        StartCoroutine(deactivateSelection(selection));
    }
    private void lineSketchObjectTest()
    {
        foreach (Transform controlPoint in controlPointParent.transform)
        {
            strokeSketchObject.AddControlPoint(controlPoint.position);
            strokeSketchObject2.AddControlPoint(controlPoint.position);
        }

        strokeSketchObject.SetStrokeCrossSection(CircularCrossSection.GenerateVertices(16), CircularCrossSection.GenerateVertices(16, 1f), .5f);
        //lineSketchObject.setLineDiameter(.7f);
        StartCoroutine(changeDiameter());

        //StartCoroutine(deactivateSelection(selection));
    }
Example #3
0
 public void Redo()
 {
     if (SketchWorld.ActiveSketchWorld.IsObjectDeleted(this.StrokeSketchObject))
     {
         SketchWorld.ActiveSketchWorld.RestoreObject(this.StrokeSketchObject);
     }
     StrokeSketchObject.AddControlPoint(NewControlPoint);
 }
Example #4
0
 public bool Execute()
 {
     StrokeSketchObject.AddControlPoint(NewControlPoint);
     return(true);
 }