1999-03-17 23:51:59 +00:00
|
|
|
// triangle.cxx -- "Triangle" interface class
|
|
|
|
//
|
|
|
|
// Written by Curtis Olson, started March 1999.
|
|
|
|
//
|
|
|
|
// Copyright (C) 1999 Curtis L. Olson - curt@flightgear.org
|
|
|
|
//
|
|
|
|
// This program is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU General Public License as
|
|
|
|
// published by the Free Software Foundation; either version 2 of the
|
|
|
|
// License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This program is distributed in the hope that it will be useful, but
|
|
|
|
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
// General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with this program; if not, write to the Free Software
|
|
|
|
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
//
|
|
|
|
// $Id$
|
|
|
|
// (Log is kept at end of this file)
|
|
|
|
|
|
|
|
|
|
|
|
#include "triangle.hxx"
|
1999-03-20 02:21:51 +00:00
|
|
|
#include "tripoly.hxx"
|
1999-03-17 23:51:59 +00:00
|
|
|
|
|
|
|
// Constructor
|
|
|
|
FGTriangle::FGTriangle( void ) {
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Destructor
|
|
|
|
FGTriangle::~FGTriangle( void ) {
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// populate this class based on the specified gpc_polys list
|
1999-03-20 20:32:51 +00:00
|
|
|
int
|
|
|
|
FGTriangle::build( const fitnode_list& fit_list,
|
|
|
|
const FGgpcPolyList& gpc_polys )
|
|
|
|
{
|
1999-03-21 14:02:05 +00:00
|
|
|
FGTriPoly poly;
|
1999-03-19 00:27:09 +00:00
|
|
|
int index;
|
1999-03-20 20:32:51 +00:00
|
|
|
|
1999-03-21 14:02:05 +00:00
|
|
|
// Point3D junkp;
|
|
|
|
// int junkc = 0;
|
|
|
|
// char junkn[256];
|
|
|
|
// FILE *junkfp;
|
|
|
|
|
1999-03-20 20:32:51 +00:00
|
|
|
// traverse the dem fit list and gpc_polys building a unified node
|
|
|
|
// list and converting the polygons so that they reference the
|
|
|
|
// node list by index (starting at zero) rather than listing the
|
|
|
|
// points explicitely
|
|
|
|
|
|
|
|
const_fitnode_list_iterator f_current, f_last;
|
|
|
|
f_current = fit_list.begin();
|
|
|
|
f_last = fit_list.end();
|
|
|
|
for ( ; f_current != f_last; ++f_current ) {
|
1999-03-22 23:49:01 +00:00
|
|
|
index = in_nodes.unique_add( *f_current );
|
1999-03-20 20:32:51 +00:00
|
|
|
}
|
1999-03-17 23:51:59 +00:00
|
|
|
|
|
|
|
gpc_polygon *gpc_poly;
|
1999-03-18 04:31:10 +00:00
|
|
|
const_gpcpoly_iterator current, last;
|
1999-03-17 23:51:59 +00:00
|
|
|
|
|
|
|
// process polygons in priority order
|
|
|
|
cout << "prepairing node list and polygons" << endl;
|
|
|
|
|
1999-03-19 00:27:09 +00:00
|
|
|
for ( int i = 0; i < FG_MAX_AREA_TYPES; ++i ) {
|
1999-03-17 23:51:59 +00:00
|
|
|
cout << "area type = " << i << endl;
|
|
|
|
current = gpc_polys.polys[i].begin();
|
|
|
|
last = gpc_polys.polys[i].end();
|
|
|
|
for ( ; current != last; ++current ) {
|
|
|
|
gpc_poly = *current;
|
1999-03-19 00:27:09 +00:00
|
|
|
cout << "processing a polygon, contours = "
|
|
|
|
<< gpc_poly->num_contours << endl;
|
|
|
|
|
|
|
|
if (gpc_poly->num_contours <= 0 ) {
|
|
|
|
cout << "FATAL ERROR! no contours in this polygon" << endl;
|
|
|
|
exit(-1);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (gpc_poly->num_contours > 1 ) {
|
|
|
|
cout << "FATAL ERROR! no multi-contour support" << endl;
|
1999-03-20 20:32:51 +00:00
|
|
|
sleep(2);
|
1999-03-19 22:29:04 +00:00
|
|
|
// exit(-1);
|
1999-03-19 00:27:09 +00:00
|
|
|
}
|
1999-03-17 23:51:59 +00:00
|
|
|
|
|
|
|
for ( int j = 0; j < gpc_poly->num_contours; j++ ) {
|
1999-03-21 14:02:05 +00:00
|
|
|
|
|
|
|
poly.erase();
|
|
|
|
|
|
|
|
// sprintf(junkn, "g.%d", junkc++);
|
|
|
|
// junkfp = fopen(junkn, "w");
|
|
|
|
|
1999-03-17 23:51:59 +00:00
|
|
|
for ( int k = 0; k < gpc_poly->contour[j].num_vertices; k++ ) {
|
|
|
|
Point3D p( gpc_poly->contour[j].vertex[k].x,
|
|
|
|
gpc_poly->contour[j].vertex[k].y,
|
|
|
|
0 );
|
1999-03-22 23:49:01 +00:00
|
|
|
index = in_nodes.unique_add( p );
|
|
|
|
// junkp = in_nodes.get_node( index );
|
1999-03-21 14:02:05 +00:00
|
|
|
// fprintf(junkfp, "%.4f %.4f\n", junkp.x(), junkp.y());
|
1999-03-20 02:21:51 +00:00
|
|
|
poly.add_node(index);
|
1999-03-19 00:27:09 +00:00
|
|
|
// cout << index << endl;
|
1999-03-17 23:51:59 +00:00
|
|
|
}
|
1999-03-21 14:02:05 +00:00
|
|
|
// fprintf(junkfp, "%.4f %.4f\n",
|
|
|
|
// gpc_poly->contour[j].vertex[0].x,
|
|
|
|
// gpc_poly->contour[j].vertex[0].y);
|
|
|
|
// fclose(junkfp);
|
|
|
|
|
1999-03-22 23:49:01 +00:00
|
|
|
poly.calc_point_inside( in_nodes );
|
1999-03-20 13:22:10 +00:00
|
|
|
|
1999-03-19 00:27:09 +00:00
|
|
|
polylist[i].push_back(poly);
|
1999-03-17 23:51:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
1999-03-18 04:31:10 +00:00
|
|
|
|
1999-03-19 00:27:09 +00:00
|
|
|
for ( int i = 0; i < FG_MAX_AREA_TYPES; ++i ) {
|
1999-03-19 22:29:04 +00:00
|
|
|
if ( polylist[i].size() ) {
|
|
|
|
cout << get_area_name((AreaType)i) << " = "
|
|
|
|
<< polylist[i].size() << endl;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
1999-03-20 20:32:51 +00:00
|
|
|
// traverse the polygon lists and build the segment (edge) list
|
|
|
|
// that is used by the "Triangle" lib.
|
1999-03-19 22:29:04 +00:00
|
|
|
|
1999-03-20 20:32:51 +00:00
|
|
|
int i1, i2;
|
|
|
|
for ( int i = 0; i < FG_MAX_AREA_TYPES; ++i ) {
|
|
|
|
cout << "area type = " << i << endl;
|
|
|
|
tripoly_list_iterator tp_current, tp_last;
|
|
|
|
tp_current = polylist[i].begin();
|
|
|
|
tp_last = polylist[i].end();
|
1999-03-19 22:29:04 +00:00
|
|
|
|
1999-03-20 20:32:51 +00:00
|
|
|
// process each polygon in list
|
|
|
|
for ( ; tp_current != tp_last; ++tp_current ) {
|
|
|
|
poly = *tp_current;
|
1999-03-19 22:29:04 +00:00
|
|
|
|
1999-03-20 20:32:51 +00:00
|
|
|
for ( int j = 0; j < (int)(poly.size()) - 1; ++j ) {
|
|
|
|
i1 = poly.get_pt_index( j );
|
|
|
|
i2 = poly.get_pt_index( j + 1 );
|
|
|
|
trisegs.unique_add( FGTriSeg(i1, i2) );
|
|
|
|
}
|
|
|
|
i1 = poly.get_pt_index( 0 );
|
|
|
|
i2 = poly.get_pt_index( poly.size() - 1 );
|
|
|
|
trisegs.unique_add( FGTriSeg(i1, i2) );
|
|
|
|
}
|
1999-03-19 22:29:04 +00:00
|
|
|
}
|
1999-03-20 02:21:51 +00:00
|
|
|
|
|
|
|
return 0;
|
1999-03-19 22:29:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
1999-03-21 14:02:05 +00:00
|
|
|
static void write_out_data(struct triangulateio *out) {
|
|
|
|
FILE *node = fopen("tile.node", "w");
|
|
|
|
fprintf(node, "%d 2 %d 0\n",
|
|
|
|
out->numberofpoints, out->numberofpointattributes);
|
|
|
|
for (int i = 0; i < out->numberofpoints; i++) {
|
|
|
|
fprintf(node, "%d %.6f %.6f %.2f\n",
|
|
|
|
i, out->pointlist[2*i], out->pointlist[2*i + 1], 0.0);
|
|
|
|
}
|
|
|
|
fclose(node);
|
|
|
|
|
|
|
|
FILE *ele = fopen("tile.ele", "w");
|
|
|
|
fprintf(ele, "%d 3 0\n", out->numberoftriangles);
|
|
|
|
for (int i = 0; i < out->numberoftriangles; i++) {
|
|
|
|
fprintf(ele, "%d ", i);
|
|
|
|
for (int j = 0; j < out->numberofcorners; j++) {
|
|
|
|
fprintf(ele, "%d ", out->trianglelist[i * out->numberofcorners + j]);
|
|
|
|
}
|
|
|
|
for (int j = 0; j < out->numberoftriangleattributes; j++) {
|
|
|
|
fprintf(ele, "%.6f ",
|
|
|
|
out->triangleattributelist[i
|
|
|
|
* out->numberoftriangleattributes
|
|
|
|
+ j]
|
|
|
|
);
|
|
|
|
}
|
|
|
|
fprintf(ele, "\n");
|
|
|
|
}
|
|
|
|
fclose(ele);
|
|
|
|
|
|
|
|
FILE *fp = fopen("tile.poly", "w");
|
|
|
|
fprintf(fp, "0 2 1 0\n");
|
|
|
|
fprintf(fp, "%d 0\n", out->numberofsegments);
|
|
|
|
for (int i = 0; i < out->numberofsegments; ++i) {
|
|
|
|
fprintf(fp, "%d %d %d\n",
|
|
|
|
i, out->segmentlist[2*i], out->segmentlist[2*i + 1]);
|
|
|
|
}
|
|
|
|
fprintf(fp, "%d\n", out->numberofholes);
|
|
|
|
for (int i = 0; i < out->numberofholes; i++) {
|
|
|
|
fprintf(fp, "%d %.6f %.6f\n",
|
|
|
|
i, out->holelist[2*i], out->holelist[2*i + 1]);
|
|
|
|
}
|
|
|
|
fprintf(fp, "%d\n", out->numberofregions);
|
|
|
|
for (int i = 0; i < out->numberofregions; i++) {
|
|
|
|
fprintf(fp, "%d %.6f %.6f %.6f\n",
|
|
|
|
i, out->regionlist[4*i], out->regionlist[4*i + 1],
|
|
|
|
out->regionlist[4*i + 2]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
1999-03-19 22:29:04 +00:00
|
|
|
// triangulate each of the polygon areas
|
1999-03-20 20:32:51 +00:00
|
|
|
int FGTriangle::run_triangulate() {
|
1999-03-20 02:21:51 +00:00
|
|
|
FGTriPoly poly;
|
1999-03-20 20:32:51 +00:00
|
|
|
Point3D p;
|
|
|
|
struct triangulateio in, out, vorout;
|
|
|
|
int counter;
|
1999-03-20 13:22:10 +00:00
|
|
|
|
|
|
|
// point list
|
1999-03-22 23:49:01 +00:00
|
|
|
trinode_list node_list = in_nodes.get_node_list();
|
1999-03-20 13:22:10 +00:00
|
|
|
in.numberofpoints = node_list.size();
|
|
|
|
in.pointlist = (REAL *) malloc(in.numberofpoints * 2 * sizeof(REAL));
|
1999-03-19 22:29:04 +00:00
|
|
|
|
1999-03-20 13:22:10 +00:00
|
|
|
trinode_list_iterator tn_current, tn_last;
|
|
|
|
tn_current = node_list.begin();
|
|
|
|
tn_last = node_list.end();
|
1999-03-20 20:32:51 +00:00
|
|
|
counter = 0;
|
1999-03-20 13:22:10 +00:00
|
|
|
for ( ; tn_current != tn_last; ++tn_current ) {
|
|
|
|
in.pointlist[counter++] = tn_current->x();
|
|
|
|
in.pointlist[counter++] = tn_current->y();
|
|
|
|
}
|
|
|
|
|
1999-03-20 20:32:51 +00:00
|
|
|
in.numberofpointattributes = 1;
|
|
|
|
in.pointattributelist = (REAL *) malloc(in.numberofpoints *
|
|
|
|
in.numberofpointattributes *
|
|
|
|
sizeof(REAL));
|
|
|
|
for ( int i = 0; i < in.numberofpoints * in.numberofpointattributes; i++) {
|
|
|
|
in.pointattributelist[i] = 0.0;
|
|
|
|
}
|
|
|
|
|
|
|
|
in.pointmarkerlist = (int *) malloc(in.numberofpoints * sizeof(int));
|
|
|
|
for ( int i = 0; i < in.numberofpoints; i++) {
|
|
|
|
in.pointmarkerlist[i] = 0;
|
|
|
|
}
|
1999-03-20 13:22:10 +00:00
|
|
|
|
1999-03-21 14:02:05 +00:00
|
|
|
// triangle list
|
|
|
|
in.numberoftriangles = 0;
|
|
|
|
|
1999-03-20 13:22:10 +00:00
|
|
|
// segment list
|
1999-03-20 20:32:51 +00:00
|
|
|
triseg_list seg_list = trisegs.get_seg_list();
|
|
|
|
in.numberofsegments = seg_list.size();
|
|
|
|
in.segmentlist = (int *) malloc(in.numberofsegments * 2 * sizeof(int));
|
1999-03-22 23:49:01 +00:00
|
|
|
in.segmentmarkerlist = (int *) NULL;
|
1999-03-20 13:22:10 +00:00
|
|
|
|
1999-03-20 20:32:51 +00:00
|
|
|
triseg_list_iterator s_current, s_last;
|
|
|
|
s_current = seg_list.begin();
|
|
|
|
s_last = seg_list.end();
|
|
|
|
counter = 0;
|
|
|
|
for ( ; s_current != s_last; ++s_current ) {
|
|
|
|
in.segmentlist[counter++] = s_current->get_n1();
|
|
|
|
in.segmentlist[counter++] = s_current->get_n2();
|
1999-03-20 13:22:10 +00:00
|
|
|
}
|
|
|
|
|
1999-03-20 20:32:51 +00:00
|
|
|
// hole list (make holes for airport ignore areas)
|
|
|
|
in.numberofholes = polylist[(int)AirportIgnoreArea].size();
|
|
|
|
in.holelist = (REAL *) malloc(in.numberofholes * 2 * sizeof(REAL));
|
1999-03-20 13:22:10 +00:00
|
|
|
|
1999-03-20 20:32:51 +00:00
|
|
|
tripoly_list_iterator h_current, h_last;
|
|
|
|
h_current = polylist[(int)AirportIgnoreArea].begin();
|
|
|
|
h_last = polylist[(int)AirportIgnoreArea].end();
|
|
|
|
counter = 0;
|
|
|
|
for ( ; h_current != h_last; ++h_current ) {
|
|
|
|
poly = *h_current;
|
|
|
|
p = poly.get_point_inside();
|
|
|
|
in.holelist[counter++] = p.x();
|
|
|
|
in.holelist[counter++] = p.y();
|
|
|
|
}
|
1999-03-20 13:22:10 +00:00
|
|
|
|
1999-03-20 20:32:51 +00:00
|
|
|
// region list
|
|
|
|
in.numberofregions = 0;
|
1999-03-19 22:29:04 +00:00
|
|
|
for ( int i = 0; i < FG_MAX_AREA_TYPES; ++i ) {
|
1999-03-20 20:32:51 +00:00
|
|
|
in.numberofregions += polylist[i].size();
|
|
|
|
}
|
1999-03-19 22:29:04 +00:00
|
|
|
|
1999-03-20 20:32:51 +00:00
|
|
|
in.regionlist = (REAL *) malloc(in.numberofregions * 4 * sizeof(REAL));
|
1999-03-21 14:02:05 +00:00
|
|
|
counter = 0;
|
1999-03-20 20:32:51 +00:00
|
|
|
for ( int i = 0; i < FG_MAX_AREA_TYPES; ++i ) {
|
|
|
|
tripoly_list_iterator h_current, h_last;
|
1999-03-21 14:02:05 +00:00
|
|
|
h_current = polylist[(int)i].begin();
|
|
|
|
h_last = polylist[(int)i].end();
|
1999-03-20 20:32:51 +00:00
|
|
|
for ( ; h_current != h_last; ++h_current ) {
|
|
|
|
poly = *h_current;
|
|
|
|
p = poly.get_point_inside();
|
|
|
|
in.regionlist[counter++] = p.x(); // x coord
|
|
|
|
in.regionlist[counter++] = p.y(); // y coord
|
|
|
|
in.regionlist[counter++] = i; // region attribute
|
|
|
|
in.regionlist[counter++] = -1.0; // area constraint (unused)
|
1999-03-19 22:29:04 +00:00
|
|
|
}
|
1999-03-19 00:27:09 +00:00
|
|
|
}
|
1999-03-20 20:32:51 +00:00
|
|
|
|
|
|
|
// prep the output structures
|
|
|
|
out.pointlist = (REAL *) NULL; // Not needed if -N switch used.
|
|
|
|
// Not needed if -N switch used or number of point attributes is zero:
|
|
|
|
out.pointattributelist = (REAL *) NULL;
|
|
|
|
out.pointmarkerlist = (int *) NULL; // Not needed if -N or -B switch used.
|
|
|
|
out.trianglelist = (int *) NULL; // Not needed if -E switch used.
|
|
|
|
// Not needed if -E switch used or number of triangle attributes is zero:
|
|
|
|
out.triangleattributelist = (REAL *) NULL;
|
|
|
|
out.neighborlist = (int *) NULL; // Needed only if -n switch used.
|
|
|
|
// Needed only if segments are output (-p or -c) and -P not used:
|
|
|
|
out.segmentlist = (int *) NULL;
|
|
|
|
// Needed only if segments are output (-p or -c) and -P and -B not used:
|
|
|
|
out.segmentmarkerlist = (int *) NULL;
|
|
|
|
out.edgelist = (int *) NULL; // Needed only if -e switch used.
|
|
|
|
out.edgemarkerlist = (int *) NULL; // Needed if -e used and -B not used.
|
|
|
|
|
|
|
|
vorout.pointlist = (REAL *) NULL; // Needed only if -v switch used.
|
|
|
|
// Needed only if -v switch used and number of attributes is not zero:
|
|
|
|
vorout.pointattributelist = (REAL *) NULL;
|
|
|
|
vorout.edgelist = (int *) NULL; // Needed only if -v switch used.
|
|
|
|
vorout.normlist = (REAL *) NULL; // Needed only if -v switch used.
|
|
|
|
|
1999-03-21 14:02:05 +00:00
|
|
|
// TEMPORARY
|
|
|
|
// write_out_data(&in);
|
|
|
|
|
1999-03-20 20:32:51 +00:00
|
|
|
// Triangulate the points. Switches are chosen to read and write
|
|
|
|
// a PSLG (p), preserve the convex hull (c), number everything
|
|
|
|
// from zero (z), assign a regional attribute to each element (A),
|
|
|
|
// and produce an edge list (e), and a triangle neighbor list (n).
|
|
|
|
|
1999-03-21 15:48:00 +00:00
|
|
|
triangulate("pczq15Aen", &in, &out, &vorout);
|
1999-03-20 20:32:51 +00:00
|
|
|
|
|
|
|
// TEMPORARY
|
1999-03-21 14:02:05 +00:00
|
|
|
write_out_data(&out);
|
1999-03-20 20:32:51 +00:00
|
|
|
|
1999-03-22 23:49:01 +00:00
|
|
|
// now copy the results back into the corresponding FGTriangle
|
|
|
|
// structures
|
|
|
|
|
|
|
|
// nodes
|
|
|
|
for ( int i = 0; i < out.numberofpoints; i++ ) {
|
|
|
|
Point3D p( out.pointlist[2*i], out.pointlist[2*i + 1], 0.0 );
|
|
|
|
// cout << "point = " << p << endl;
|
|
|
|
out_nodes.simple_add( p );
|
|
|
|
}
|
|
|
|
|
|
|
|
// triangles
|
|
|
|
int n1, n2, n3;
|
|
|
|
for ( int i = 0; i < out.numberoftriangles; i++ ) {
|
|
|
|
n1 = out.trianglelist[i * 3];
|
|
|
|
n2 = out.trianglelist[i * 3 + 1];
|
|
|
|
n3 = out.trianglelist[i * 3 + 2];
|
|
|
|
// cout << "triangle = " << n1 << " " << n2 << " " << n3 << endl;
|
|
|
|
|
|
|
|
elelist.push_back( FGTriEle( n1, n2, n3 ) );
|
|
|
|
}
|
|
|
|
|
1999-03-20 20:32:51 +00:00
|
|
|
// free mem allocated to the "Triangle" structures
|
|
|
|
free(in.pointlist);
|
|
|
|
free(in.pointattributelist);
|
|
|
|
free(in.pointmarkerlist);
|
|
|
|
free(in.regionlist);
|
|
|
|
free(out.pointlist);
|
|
|
|
free(out.pointattributelist);
|
|
|
|
free(out.pointmarkerlist);
|
|
|
|
free(out.trianglelist);
|
|
|
|
free(out.triangleattributelist);
|
|
|
|
// free(out.trianglearealist);
|
|
|
|
free(out.neighborlist);
|
|
|
|
free(out.segmentlist);
|
|
|
|
free(out.segmentmarkerlist);
|
|
|
|
free(out.edgelist);
|
|
|
|
free(out.edgemarkerlist);
|
|
|
|
free(vorout.pointlist);
|
|
|
|
free(vorout.pointattributelist);
|
|
|
|
free(vorout.edgelist);
|
|
|
|
free(vorout.normlist);
|
|
|
|
|
1999-03-18 04:31:10 +00:00
|
|
|
return 0;
|
1999-03-17 23:51:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// $Log$
|
1999-03-22 23:49:01 +00:00
|
|
|
// Revision 1.10 1999/03/22 23:49:02 curt
|
|
|
|
// Modifications to facilitate conversion to output format.
|
|
|
|
//
|
1999-03-21 15:48:00 +00:00
|
|
|
// Revision 1.9 1999/03/21 15:48:02 curt
|
|
|
|
// Removed Dem2node from the Tools fold.
|
|
|
|
// Tweaked the triangulator options to add quality mesh refinement.
|
|
|
|
//
|
1999-03-21 14:02:05 +00:00
|
|
|
// Revision 1.8 1999/03/21 14:02:06 curt
|
|
|
|
// Added a mechanism to dump out the triangle structures for viewing.
|
|
|
|
// Fixed a couple bugs in first pass at triangulation.
|
|
|
|
// - needed to explicitely initialize the polygon accumulator in triangle.cxx
|
|
|
|
// before each polygon rather than depending on the default behavior.
|
|
|
|
// - Fixed a problem with region attribute propagation where I wasn't generating
|
|
|
|
// the hole points correctly.
|
|
|
|
//
|
1999-03-20 20:32:51 +00:00
|
|
|
// Revision 1.7 1999/03/20 20:32:55 curt
|
|
|
|
// First mostly successful tile triangulation works. There's plenty of tweaking
|
|
|
|
// to do, but we are marching in the right direction.
|
|
|
|
//
|
1999-03-20 13:22:10 +00:00
|
|
|
// Revision 1.6 1999/03/20 13:22:11 curt
|
|
|
|
// Added trisegs.[ch]xx tripoly.[ch]xx.
|
|
|
|
//
|
1999-03-20 02:21:51 +00:00
|
|
|
// Revision 1.5 1999/03/20 02:21:52 curt
|
|
|
|
// Continue shaping the code towards triangulation bliss. Added code to
|
|
|
|
// calculate some point guaranteed to be inside a polygon.
|
|
|
|
//
|
1999-03-19 22:29:04 +00:00
|
|
|
// Revision 1.4 1999/03/19 22:29:04 curt
|
|
|
|
// Working on preparationsn for triangulation.
|
|
|
|
//
|
1999-03-19 00:27:09 +00:00
|
|
|
// Revision 1.3 1999/03/19 00:27:10 curt
|
|
|
|
// Continued work on triangulation preparation.
|
|
|
|
//
|
1999-03-18 04:31:10 +00:00
|
|
|
// Revision 1.2 1999/03/18 04:31:11 curt
|
|
|
|
// Let's not pass copies of huge structures on the stack ... ye might see a
|
|
|
|
// segfault ... :-)
|
|
|
|
//
|
1999-03-17 23:51:59 +00:00
|
|
|
// Revision 1.1 1999/03/17 23:51:59 curt
|
|
|
|
// Initial revision.
|
|
|
|
//
|