示例#1
0
        public new static vtkTextActor New()
        {
            vtkTextActor result      = null;
            uint         mteStatus   = 0u;
            uint         mteIndex    = 4294967295u;
            uint         rawRefCount = 0u;
            IntPtr       intPtr      = vtkTextActor.vtkTextActor_New(ref mteStatus, ref mteIndex, ref rawRefCount);

            if (IntPtr.Zero != intPtr)
            {
                bool flag;
                result = (vtkTextActor)Methods.CreateWrappedObject(mteStatus, mteIndex, rawRefCount, intPtr, true, out flag);
            }
            return(result);
        }
示例#2
0
        private void TestAddActorsToRenderWindow(vtkRenderWindow renWin)
        {
            vtkConeSource vtkConeSource = new vtkConeSource();
            vtkMapper     vtkMapper     = vtkPolyDataMapper.New();

            vtkMapper.SetInputConnection(vtkConeSource.GetOutputPort());
            vtkActor vtkActor = new vtkActor();

            vtkActor.SetMapper(vtkMapper);
            vtkRenderer firstRenderer = renWin.GetRenderers().GetFirstRenderer();

            firstRenderer.AddActor(vtkActor);
            vtkTextActor vtkTextActor = new vtkTextActor();

            vtkTextActor.SetInput(vtkVersion.GetVTKSourceVersion());
            firstRenderer.AddActor(vtkTextActor);
        }
示例#3
0
        public new static vtkTextActor SafeDownCast(vtkObjectBase o)
        {
            vtkTextActor vtkTextActor = null;
            uint         mteStatus    = 0u;
            uint         mteIndex     = 4294967295u;
            uint         rawRefCount  = 0u;
            IntPtr       intPtr       = vtkTextActor.vtkTextActor_SafeDownCast_26((o == null) ? default(HandleRef) : o.GetCppThis(), ref mteStatus, ref mteIndex, ref rawRefCount);

            if (IntPtr.Zero != intPtr)
            {
                bool flag;
                vtkTextActor = (vtkTextActor)Methods.CreateWrappedObject(mteStatus, mteIndex, rawRefCount, intPtr, true, out flag);
                if (flag)
                {
                    vtkTextActor.Register(null);
                }
            }
            return(vtkTextActor);
        }
        public virtual vtkTextActor GetTextActor()
        {
            vtkTextActor vtkTextActor = null;
            uint         mteStatus    = 0u;
            uint         mteIndex     = 4294967295u;
            uint         rawRefCount  = 0u;
            IntPtr       intPtr       = vtkTextRepresentation.vtkTextRepresentation_GetTextActor_07(base.GetCppThis(), ref mteStatus, ref mteIndex, ref rawRefCount);

            if (IntPtr.Zero != intPtr)
            {
                bool flag;
                vtkTextActor = (vtkTextActor)Methods.CreateWrappedObject(mteStatus, mteIndex, rawRefCount, intPtr, true, out flag);
                if (flag)
                {
                    vtkTextActor.Register(null);
                }
            }
            return(vtkTextActor);
        }
        private void AddConeSourceToRenderWindow(Kitware.VTK.vtkRenderWindow renWin)
        {
            Kitware.VTK.vtkConeSource source = new Kitware.VTK.vtkConeSource();

            Kitware.VTK.vtkMapper mapper = new Kitware.VTK.vtkOpenGLPolyDataMapper();
            mapper.SetInputConnection(source.GetOutputPort());

            Kitware.VTK.vtkActor actor = new Kitware.VTK.vtkActor();
            actor.SetMapper(mapper);

            Kitware.VTK.vtkRenderer ren = null; //new Kitware.VTK.vtkOpenGLRenderer();
            ren = renWin.GetRenderers().GetFirstRenderer();
            ren.AddActor(actor);

            Kitware.VTK.vtkTextActor textActor = new Kitware.VTK.vtkTextActor();
            textActor.SetInput(Kitware.VTK.vtkVersion.GetVTKSourceVersion());
            ren.AddActor(textActor);

            //int n = renWin.GetRenderers().GetNumberOfItems();
            //System.Diagnostics.Debug.WriteLine(n);
            //System.Diagnostics.Debug.WriteLine(
            //  Kitware.mummy.Runtime.Methods.Print(false)
            //  );
        }
        private void AddConeSourceToRenderWindow(Kitware.VTK.vtkRenderWindow renWin)
        {
            Kitware.VTK.vtkConeSource source = new Kitware.VTK.vtkConeSource();

              Kitware.VTK.vtkMapper mapper = new Kitware.VTK.vtkOpenGLPolyDataMapper();
              mapper.SetInputConnection(source.GetOutputPort());

              Kitware.VTK.vtkActor actor = new Kitware.VTK.vtkActor();
              actor.SetMapper(mapper);

              Kitware.VTK.vtkRenderer ren = null; //new Kitware.VTK.vtkOpenGLRenderer();
              ren = renWin.GetRenderers().GetFirstRenderer();
              ren.AddActor(actor);

              Kitware.VTK.vtkTextActor textActor = new Kitware.VTK.vtkTextActor();
              textActor.SetInput(Kitware.VTK.vtkVersion.GetVTKSourceVersion());
              ren.AddActor(textActor);

              //int n = renWin.GetRenderers().GetNumberOfItems();
              //System.Diagnostics.Debug.WriteLine(n);
              //System.Diagnostics.Debug.WriteLine(
              //  Kitware.mummy.Runtime.Methods.Print(false)
              //  );
        }
 public void SetTextActor(vtkTextActor textActor)
 {
     vtkTextRepresentation.vtkTextRepresentation_SetTextActor_22(base.GetCppThis(), (textActor == null) ? default(HandleRef) : textActor.GetCppThis());
 }
示例#8
0
 public void SetTextActor(vtkTextActor textActor)
 {
     vtkTextWidget.vtkTextWidget_SetTextActor_09(base.GetCppThis(), (textActor == null) ? default(HandleRef) : textActor.GetCppThis());
 }