Example #1
0
    void Start()
    {
        SphereSource = Kitware.VTK.vtkSphereSource.New();
        SphereSource.SetRadius(1);
        SphereSource.Update();

        vtkToUnity = new VtkToUnity(SphereSource.GetOutputPort(), "VTK Sphere Source");
        vtkToUnity.ColorBy(Color.grey);
        vtkToUnity.Update();
    }
Example #2
0
    void Generate()
    {
        if (SphereSource == null)
        {
            SphereSource = Kitware.VTK.vtkSphereSource.New();
        }
        if (vtkToUnity == null)
        {
            vtkToUnity = new VtkToUnity(SphereSource.GetOutputPort(), "VTK Run In Editor");
            vtkToUnity.ColorBy(Color.green);
        }
        SphereSource.SetPhiResolution(resolution);
        SphereSource.SetThetaResolution(resolution);
        SphereSource.SetRadius(1);
        SphereSource.Update();

        vtkToUnity.Update();
    }