Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

star.cpp

00001 /***************************************************************************
00002                         star.cpp  -  description
00003                             -------------------
00004     begin                : july 2nd, 2006
00005     copyright            : (C) 2006 by Frederic RODRIGO
00006     email                : f.rodrigo free.fr
00007 
00008     $Id: filter.h 20 2006-07-16 10:28:39Z neoneurone $
00009  ***************************************************************************/
00010 
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   any later version.                                                    *
00017  *                                                                         *
00018  ***************************************************************************/
00019 
00020 #include "star.h"
00021 
00022 namespace Triangulation
00023 {
00024 
00025 Triangle*
00026 Star::process( const uint nVertex, const Vertex* vertex ) const
00027 {
00028     Triangle *triangle = new Triangle[nVertex-2];
00029     for ( uint i=1; i<nVertex-1; ++i )
00030     {
00031         triangle[i-1].a = vertex[0];
00032         triangle[i-1].b = vertex[i];
00033         triangle[i-1].c = vertex[i+1];
00034     }
00035     return triangle;
00036 }
00037 
00038 }

Generated on Sat Nov 11 10:21:10 2006 for OpenCity by  doxygen 1.4.2