vtkwrap_test06.cpp

00001 /***********************************************************************************
00002  * VTKwrap - Simple VTK wrappers                                                   *
00003  * Copyright (C) 2005 Dorival de Moraes Pedroso <dorival.pedroso at gmail.com>     *
00004  *                                                                                 *
00005  * This file is part of VTKwrap.                                                   *
00006  *                                                                                 *
00007  * VTKwrap is free software; you can redistribute it and/or modify it under        *
00008  * the  terms of the GNU General Public License as published by the Free Software  *
00009  * Foundation; either version 2 of the License, or (at your option) any later      *
00010  * version.                                                                        *
00011  *                                                                                 *
00012  * VTKwrap is distributed in the hope that it will be useful, but WITHOUT ANY      *
00013  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A *
00014  * PARTICULAR PURPOSE. See the GNU General Public License for more details.        *
00015  *                                                                                 *
00016  * You should have received a copy of the GNU General Public License along with    *
00017  * VTKwrap; if not, write to the Free Software Foundation, Inc., 51 Franklin       *
00018  * Street, Fifth Floor, Boston, MA 02110-1301, USA                                 *
00019  ***********************************************************************************/
00020 
00021 #include <iostream>
00022 #include <cmath>
00023 #include <vector>
00024 
00025 #include "numerical/meshgrid.h"
00026 
00027 #include "vtkwrap/vtkwin.h"
00028 #include "vtkwrap/sgridoutline.h"
00029 #include "vtkwrap/axes.h"
00030 #include "vtkwrap/colors.h"
00031 #include "vtkwrap/cutclip.h"
00032 #include "vtkwrap/sphere.h"
00033 #include "vtkwrap/cube.h"
00034 #include "vtkwrap/plane.h"
00035 
00036 int main(int argc, char **argv)
00037 {
00038     VTKWin win;
00039 
00040     Axes   ax(2, true);
00041     Sphere sp(1,1,1,0.5,"blue",0.5);
00042     Cube   cu(0,0,0,1,1,1,"red",0.5);
00043     Plane  pl(/*origin*/0,0,0, /*P1*/2,0,0, /*P2*/0,2,0, /*normal*/0,0,1, "yellow",0.5);
00044 
00045     //CutClip cc1(0,0,0,1,1,1,cu.GetOutputPort());
00046 
00047     win.AddActor(ax.GetActor());
00048     win.AddActor(sp.GetActor());
00049     //win.AddActor(cu.GetActor());
00050     win.AddActor(cu.GetWireActor());
00051     //cc1.AddActorsTo(win);
00052     //win.AddActor(cc1.GetCutActor());
00053     win.AddActor(pl.GetActor());
00054 
00055     win.Show();
00056 
00057     //win.WritePNG("test06.png");
00058 
00059     return 0;
00060 }

Generated on Wed Jan 24 15:56:28 2007 for MechSys by  doxygen 1.4.7