vtkwrap_test05.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 
00034 int main(int argc, char **argv)
00035 {
00036     VTKWin win;
00037 
00038     Axes ax(1.2, true);
00039     win.AddActor(ax.GetActor());
00040 
00041     Sphere sph(0,0,0,1,"blue");
00042     //sph.GetObject()->SetPhiResolution(40);
00043     //sph.GetObject()->SetThetaResolution(40);
00044     //win.AddActor(sph.GetActor());
00045 
00046     CutClip cc;
00047     cc.SetCPartWire(true);
00048     cc.Generate(0,0,0,1,1,1, sph.GetOutputPort());
00049     cc.AddActorsTo(win);
00050     //win.AddActor(cc.GetClipActor());
00051     //win.AddActor(cc.GetCutActor());
00052     //win.AddActor(cc.GetCPartActor());
00053 
00054     win.Show();
00055 
00056     return 0;
00057 }

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