public new static vtkConeSource New() { vtkConeSource result = null; uint mteStatus = 0u; uint mteIndex = 4294967295u; uint rawRefCount = 0u; IntPtr intPtr = vtkConeSource.vtkConeSource_New(ref mteStatus, ref mteIndex, ref rawRefCount); if (IntPtr.Zero != intPtr) { bool flag; result = (vtkConeSource)Methods.CreateWrappedObject(mteStatus, mteIndex, rawRefCount, intPtr, true, out flag); } return(result); }
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); }
public new static vtkConeSource SafeDownCast(vtkObjectBase o) { vtkConeSource vtkConeSource = null; uint mteStatus = 0u; uint mteIndex = 4294967295u; uint rawRefCount = 0u; IntPtr intPtr = vtkConeSource.vtkConeSource_SafeDownCast_22((o == null) ? default(HandleRef) : o.GetCppThis(), ref mteStatus, ref mteIndex, ref rawRefCount); if (IntPtr.Zero != intPtr) { bool flag; vtkConeSource = (vtkConeSource)Methods.CreateWrappedObject(mteStatus, mteIndex, rawRefCount, intPtr, true, out flag); if (flag) { vtkConeSource.Register(null); } } return(vtkConeSource); }
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) // ); }