/// <summary> /// The main entry method called by the CSharp driver /// </summary> /// <param name="argv"></param> public static void AVTestSpherePuzzle(String [] argv) { //Prefix Content is: "" // prevent the tk window from showing up then start the event loop[] renWin = vtkRenderWindow.New(); // create a rendering window and renderer[] ren1 = vtkRenderer.New(); renWin.AddRenderer((vtkRenderer)ren1); renWin.SetSize((int)400,(int)400); puzzle = new vtkSpherePuzzle(); mapper = vtkPolyDataMapper.New(); mapper.SetInputConnection((vtkAlgorithmOutput)puzzle.GetOutputPort()); actor = new vtkActor(); actor.SetMapper((vtkMapper)mapper); arrows = new vtkSpherePuzzleArrows(); mapper2 = vtkPolyDataMapper.New(); mapper2.SetInputConnection((vtkAlgorithmOutput)arrows.GetOutputPort()); actor2 = new vtkActor(); actor2.SetMapper((vtkMapper)mapper2); // Add the actors to the renderer, set the background and size[] //[] ren1.AddActor((vtkProp)actor); ren1.AddActor((vtkProp)actor2); ren1.SetBackground((double)0.1,(double)0.2,(double)0.4); LastVal = -1; //method moved //method moved renWin.Render(); cam = ren1.GetActiveCamera(); cam.Elevation((double)-40); puzzle.MoveHorizontal((int)0,(int)100,(int)0); puzzle.MoveHorizontal((int)1,(int)100,(int)1); puzzle.MoveHorizontal((int)2,(int)100,(int)0); puzzle.MoveVertical((int)2,(int)100,(int)0); puzzle.MoveVertical((int)1,(int)100,(int)0); renWin.Render(); //deleteAllVTKObjects(); }
/// <summary> /// The main entry method called by the CSharp driver /// </summary> /// <param name="argv"></param> public static void AVTestSpherePuzzle(String [] argv) { //Prefix Content is: "" // prevent the tk window from showing up then start the event loop[] renWin = vtkRenderWindow.New(); // create a rendering window and renderer[] ren1 = vtkRenderer.New(); renWin.AddRenderer((vtkRenderer)ren1); renWin.SetSize((int)400, (int)400); puzzle = new vtkSpherePuzzle(); mapper = vtkPolyDataMapper.New(); mapper.SetInputConnection((vtkAlgorithmOutput)puzzle.GetOutputPort()); actor = new vtkActor(); actor.SetMapper((vtkMapper)mapper); arrows = new vtkSpherePuzzleArrows(); mapper2 = vtkPolyDataMapper.New(); mapper2.SetInputConnection((vtkAlgorithmOutput)arrows.GetOutputPort()); actor2 = new vtkActor(); actor2.SetMapper((vtkMapper)mapper2); // Add the actors to the renderer, set the background and size[] //[] ren1.AddActor((vtkProp)actor); ren1.AddActor((vtkProp)actor2); ren1.SetBackground((double)0.1, (double)0.2, (double)0.4); LastVal = -1; //method moved //method moved renWin.Render(); cam = ren1.GetActiveCamera(); cam.Elevation((double)-40); puzzle.MoveHorizontal((int)0, (int)100, (int)0); puzzle.MoveHorizontal((int)1, (int)100, (int)1); puzzle.MoveHorizontal((int)2, (int)100, (int)0); puzzle.MoveVertical((int)2, (int)100, (int)0); puzzle.MoveVertical((int)1, (int)100, (int)0); renWin.Render(); //deleteAllVTKObjects(); }
///<summary> A Set Method for Static Variables </summary> public static void Setarrows(vtkSpherePuzzleArrows toSet) { arrows = toSet; }