Esempio n. 1
0
        public new vtkAxesActor NewInstance()
        {
            vtkAxesActor result      = null;
            uint         mteStatus   = 0u;
            uint         mteIndex    = 4294967295u;
            uint         rawRefCount = 0u;
            IntPtr       intPtr      = vtkAxesActor.vtkAxesActor_NewInstance_55(base.GetCppThis(), ref mteStatus, ref mteIndex, ref rawRefCount);

            if (IntPtr.Zero != intPtr)
            {
                bool flag;
                result = (vtkAxesActor)Methods.CreateWrappedObject(mteStatus, mteIndex, rawRefCount, intPtr, true, out flag);
            }
            return(result);
        }
Esempio n. 2
0
        public new static vtkAxesActor SafeDownCast(vtkObjectBase o)
        {
            vtkAxesActor vtkAxesActor = null;
            uint         mteStatus    = 0u;
            uint         mteIndex     = 4294967295u;
            uint         rawRefCount  = 0u;
            IntPtr       intPtr       = vtkAxesActor.vtkAxesActor_SafeDownCast_60((o == null) ? default(HandleRef) : o.GetCppThis(), ref mteStatus, ref mteIndex, ref rawRefCount);

            if (IntPtr.Zero != intPtr)
            {
                bool flag;
                vtkAxesActor = (vtkAxesActor)Methods.CreateWrappedObject(mteStatus, mteIndex, rawRefCount, intPtr, true, out flag);
                if (flag)
                {
                    vtkAxesActor.Register(null);
                }
            }
            return(vtkAxesActor);
        }
Esempio n. 3
0
        private void InitializeVTK()
        {
            Kitware.VTK.RenderWindowControl rw = new Kitware.VTK.RenderWindowControl();
            rw.AddTestActors = false;
            rw.Dock          = System.Windows.Forms.DockStyle.Fill;
            wfh.Child        = rw;
            wfh.Visibility   = System.Windows.Visibility.Visible;
            Kitware.VTK.vtkRendererCollection rs = rw.RenderWindow.GetRenderers();
            int rsc = rs.GetNumberOfItems();

            Console.WriteLine(rsc + " renderers");
            Kitware.VTK.vtkRenderer r = rs.GetFirstRenderer();
            r.SetBackground(0.1, 0.3, 0.7);
            r.SetBackground2(0.7, 0.8, 1.0);
            r.SetGradientBackground(true);

            Kitware.VTK.vtkAxesActor axa = new Kitware.VTK.vtkAxesActor();
            r.AddActor(axa);

            string vtkVersion = Kitware.VTK.vtkVersion.GetVTKVersion();

            vtkVersion = "VTK " + vtkVersion;
            Console.WriteLine(vtkVersion);

            this.label.Content = vtkVersion;

            axa.SetTotalLength(50.0, 50.0, 50.0);
            axa.SetConeRadius(0.1);
            //axa.SetAxisLabels(0);

            axa.GetXAxisCaptionActor2D().GetTextActor().SetTextScaleMode((int)Kitware.VTK.vtkTextActor.TEXT_SCALE_MODE_NONE_WrapperEnum.TEXT_SCALE_MODE_NONE);
            axa.GetXAxisCaptionActor2D().GetTextActor().GetTextProperty().SetFontSize(32);
            axa.GetYAxisCaptionActor2D().GetTextActor().SetTextScaleMode((int)Kitware.VTK.vtkTextActor.TEXT_SCALE_MODE_NONE_WrapperEnum.TEXT_SCALE_MODE_NONE);
            axa.GetYAxisCaptionActor2D().GetTextActor().GetTextProperty().SetFontSize(32);
            axa.GetZAxisCaptionActor2D().GetTextActor().SetTextScaleMode((int)Kitware.VTK.vtkTextActor.TEXT_SCALE_MODE_NONE_WrapperEnum.TEXT_SCALE_MODE_NONE);
            axa.GetZAxisCaptionActor2D().GetTextActor().GetTextProperty().SetFontSize(32);

            m_sa = this.CreateSphereActor(10.0);
            r.AddActor(m_sa);

            m_sa.SetPosition(25.0, 25.0, 25.0);
        }