Пример #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();
    }
Пример #2
0
        public new vtkSphereSource NewInstance()
        {
            vtkSphereSource result      = null;
            uint            mteStatus   = 0u;
            uint            mteIndex    = 4294967295u;
            uint            rawRefCount = 0u;
            IntPtr          intPtr      = vtkSphereSource.vtkSphereSource_NewInstance_30(base.GetCppThis(), ref mteStatus, ref mteIndex, ref rawRefCount);

            if (IntPtr.Zero != intPtr)
            {
                bool flag;
                result = (vtkSphereSource)Methods.CreateWrappedObject(mteStatus, mteIndex, rawRefCount, intPtr, true, out flag);
            }
            return(result);
        }
Пример #3
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();
    }
Пример #4
0
        public new static vtkSphereSource SafeDownCast(vtkObjectBase o)
        {
            vtkSphereSource vtkSphereSource = null;
            uint            mteStatus       = 0u;
            uint            mteIndex        = 4294967295u;
            uint            rawRefCount     = 0u;
            IntPtr          intPtr          = vtkSphereSource.vtkSphereSource_SafeDownCast_31((o == null) ? default(HandleRef) : o.GetCppThis(), ref mteStatus, ref mteIndex, ref rawRefCount);

            if (IntPtr.Zero != intPtr)
            {
                bool flag;
                vtkSphereSource = (vtkSphereSource)Methods.CreateWrappedObject(mteStatus, mteIndex, rawRefCount, intPtr, true, out flag);
                if (flag)
                {
                    vtkSphereSource.Register(null);
                }
            }
            return(vtkSphereSource);
        }