本文整理汇总了C#中vtkRenderWindow.LineSmoothingOn方法的典型用法代码示例。如果您正苦于以下问题:C# vtkRenderWindow.LineSmoothingOn方法的具体用法?C# vtkRenderWindow.LineSmoothingOn怎么用?C# vtkRenderWindow.LineSmoothingOn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vtkRenderWindow
的用法示例。
在下文中一共展示了vtkRenderWindow.LineSmoothingOn方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: c3DWorld
//public c3DWorld(Kitware.VTK.RenderWindowControl CurrentrenderWindowControl, Sequence Seq)
//{
// this.ren1 = CurrentrenderWindowControl.RenderWindow.GetRenderers().GetFirstRenderer();
// this.renWin = CurrentrenderWindowControl.RenderWindow;
// if (Seq == null)
// {
// Xres = Yres = Zres = 0;
// }
// else
// {
// Xres = Seq.XResolution;
// Yres = Seq.YResolution;
// Zres = Seq.ZResolution;
// }
// ListPolyDataMapper = new List<vtkPolyDataMapper>();
// ListObject = new List<cObject3D>();
// ListVolume = new List<cVolume3D>();
//}
/// <summary>
/// Create a 3D world
/// </summary>
/// <param name="CurrentrenderWindowControl">vtk Control</param>
/// <param name="Dimensions">in pixels</param>
/// <param name="Resolution">spatial resolutions</param>
public c3DWorld(cPoint3D Dimensions, cPoint3D Resolution, RenderWindowControl CurrentrenderWindowControl, int[] WinPos)
{
// int[] Pos = renWin.GetPosition();
//,
if (CurrentrenderWindowControl == null)
{
renWin = vtkRenderWindow.New();
renWin.LineSmoothingOn();
renWin.PointSmoothingOn();
renWin.SetWindowName("3D World");
renWin.BordersOn();
renWin.DoubleBufferOn();
renWin.SetSize(750, 500);
// if(WinPos!=null) renWin.SetPosition(WinPos[0], WinPos[1]);
// this.ren1 = CurrentrenderWindowControl.RenderWindow.GetRenderers().GetFirstRenderer();
//CurrentrenderWindowControl.RenderWindow;
}
//// Menu Strip Construction
//this.contextMenuStripActorPicker = new ContextMenuStrip();
//ToolStripMenuItem StripMenuItemDisplay = new ToolStripMenuItem("Display");
//contextMenuStripActorPicker.Items.Add(StripMenuItemDisplay);
this.ren1 = vtkRenderer.New();
//renWin = CurrentrenderWindowControl.RenderWindow;//vtkRenderWindow.New();
renWin.AddRenderer(ren1);
iren = new vtkRenderWindowInteractor();
iren.SetRenderWindow(renWin);
//iren.SetInteractorStyle(vtkInteractorStyleJoystickCamera.New());
iren.SetInteractorStyle(vtkInteractorStyleTrackballCamera.New());
// iren.SetInteractorStyle(vtkInteractorStyleTerrain.New());
// iren.LeftButtonPressEvt += new vtkObject.vtkObjectEventHandler(RenderWindow_LeftButtonPressEvt);
iren.KeyPressEvt += new vtkObject.vtkObjectEventHandler(RenderWindow_KeyPressEvt);
iren.RightButtonPressEvt += new vtkObject.vtkObjectEventHandler(RenderWindow_RightButtonPressEvt);
//Render();
//this.ren1 =
Xres = Resolution.X;
Yres = Resolution.Y;
Zres = Resolution.Z;
SizeX = (int)Dimensions.X;
SizeY = (int)Dimensions.Y;
SizeZ = (int)Dimensions.Z;
// double[] fp = ren1.GetActiveCamera().GetFocalPoint();
// double[] p = ren1.GetActiveCamera().GetPosition();
// ren1.GetActiveCamera().ParallelProjectionOn();
// double dist = Math.Sqrt((p[0] - fp[0]) * (p[0] - fp[0]) + (p[1] - fp[1]) * (p[1] - fp[1]) + (p[2] - fp[2]) * (p[2] - fp[2]));
// ren1.GetActiveCamera().SetPosition(fp[0], fp[1], fp[2] + dist*1000);
// ren1.GetActiveCamera().Zoom(2);
//ren1.Render();
// this.Render();
ListPolyDataMapper = new List<vtkPolyDataMapper>();
ListObject = new List<cObject3D>();
// Vtk_CameraViewOrientation = ren1.GetActiveCamera();
}