Exemple #1
0
        void CreateNewPreview(bool bIsCurve)
        {
            preview      = null;
            curvePreview = null;

            if (bIsCurve)
            {
                curvePreview = new CurveRevolvePreview();
                curvePreview.Create(scene.TransparentNewSOMaterial, scene.RootGameObject, -1);
                sceneCurve = new DCurve3();
                curvePreview.RevolveCurve = sceneCurve;
                axisCurve = new DCurve3();
                curvePreview.AxisCurve = axisCurve;
                curvePreview.Visible   = false;
            }
            else
            {
                preview = new RevolvePreview();
                preview.Create(scene.TransparentNewSOMaterial, scene.RootGameObject, -1);
                sceneCurve      = new DCurve3();
                preview.Curve   = sceneCurve;
                preview.Axis    = scene.SceneFrame;
                preview.Visible = false;
            }

            // need to do this if we switch between revolve-around-object and revolve-around-curve
            if (curveSO != null)
            {
                update_curve_vertices(curveSO);
            }
        }
Exemple #2
0
 public void Cancel()
 {
     if (preview != null)
     {
         preview.Destroy();
         preview = null;
     }
     if (curvePreview != null)
     {
         curvePreview.Destroy();
         curvePreview = null;
     }
 }