Debian Codegraph @

src/triangulation/star.cpp

raw symbols SCIP
1 /***************************************************************************
2 star.cpp - description
3 -------------------
4 begin : july 2nd, 2006
5 copyright : (C) 2006 by Frederic RODRIGO
6 email : f.rodrigo free.fr
7
8 $Id: star.cpp 373 2008-10-11 21:32:54Z neoneurone $
9 ***************************************************************************/
10
11 /***************************************************************************
12 * *
13 * This program is free software; you can redistribute it and/or modify *
14 * it under the terms of the GNU General Public License as published by *
15 * the Free Software Foundation; either version 2 of the License, or *
16 * any later version. *
17 * *
18 ***************************************************************************/
19
20 #include "star.h"
21
22 namespace Triangulation
23 {
24
25 Triangle*
26 Star::process( const uint nVertex, const Vertex* vertex ) const
27 {
28 Triangle *triangle = new Triangle[nVertex-2];
29 for ( uint i=1; i<nVertex-1; ++i )
30 {
31 triangle[i-1].a = vertex[0];
32 triangle[i-1].b = vertex[i];
33 triangle[i-1].c = vertex[i+1];
34 }
35 return triangle;
36 }
37
38 }