Merge branch 'master' of /home/martin/local_fixes
This commit is contained in:
commit
92a4c3ae72
2 changed files with 28 additions and 24 deletions
|
@ -101,7 +101,7 @@ int load_area_types( const std::string& filename ) {
|
||||||
AreaType index = (AreaType)area_types.size();
|
AreaType index = (AreaType)area_types.size();
|
||||||
area_types.push_back(descriptor);
|
area_types.push_back(descriptor);
|
||||||
area_names[descriptor.name]=index;
|
area_names[descriptor.name]=index;
|
||||||
SG_LOG(SG_GENERAL, SG_INFO, " " << descriptor.name << " " << descriptor.kind);
|
SG_LOG(SG_GENERAL, SG_INFO, " " << index << " " << descriptor.name << " " << descriptor.kind);
|
||||||
in >> skipcomment;
|
in >> skipcomment;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -372,11 +372,11 @@ int TGTriangle::run_triangulate( double angle, const int pass ) {
|
||||||
|
|
||||||
in.holelist = (REAL *) malloc(in.numberofholes * 2 * sizeof(REAL));
|
in.holelist = (REAL *) malloc(in.numberofholes * 2 * sizeof(REAL));
|
||||||
|
|
||||||
|
counter = 0;
|
||||||
for ( i = 0; i < TG_MAX_AREA_TYPES; i++) {
|
for ( i = 0; i < TG_MAX_AREA_TYPES; i++) {
|
||||||
if ( is_hole_area( i ) ) {
|
if ( is_hole_area( i ) ) {
|
||||||
h_current = polylist[i].begin();
|
h_current = polylist[i].begin();
|
||||||
h_last = polylist[i].end();
|
h_last = polylist[i].end();
|
||||||
counter = 0;
|
|
||||||
for ( ; h_current != h_last; ++h_current ) {
|
for ( ; h_current != h_last; ++h_current ) {
|
||||||
poly = *h_current;
|
poly = *h_current;
|
||||||
for ( j = 0; j < poly.contours(); ++j ) {
|
for ( j = 0; j < poly.contours(); ++j ) {
|
||||||
|
@ -391,6 +391,7 @@ int TGTriangle::run_triangulate( double angle, const int pass ) {
|
||||||
// region list
|
// region list
|
||||||
in.numberofregions = 0;
|
in.numberofregions = 0;
|
||||||
for ( i = 0; i < TG_MAX_AREA_TYPES; ++i ) {
|
for ( i = 0; i < TG_MAX_AREA_TYPES; ++i ) {
|
||||||
|
if ( ! is_hole_area( i ) ) {
|
||||||
poly_list_iterator h_current, h_last;
|
poly_list_iterator h_current, h_last;
|
||||||
h_current = polylist[i].begin();
|
h_current = polylist[i].begin();
|
||||||
h_last = polylist[i].end();
|
h_last = polylist[i].end();
|
||||||
|
@ -403,10 +404,12 @@ int TGTriangle::run_triangulate( double angle, const int pass ) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
in.regionlist = (REAL *) malloc(in.numberofregions * 4 * sizeof(REAL));
|
in.regionlist = (REAL *) malloc(in.numberofregions * 4 * sizeof(REAL));
|
||||||
counter = 0;
|
counter = 0;
|
||||||
for ( i = 0; i < TG_MAX_AREA_TYPES; ++i ) {
|
for ( i = 0; i < TG_MAX_AREA_TYPES; ++i ) {
|
||||||
|
if ( ! is_hole_area( i ) ) {
|
||||||
poly_list_iterator h_current, h_last;
|
poly_list_iterator h_current, h_last;
|
||||||
h_current = polylist[(int)i].begin();
|
h_current = polylist[(int)i].begin();
|
||||||
h_last = polylist[(int)i].end();
|
h_last = polylist[(int)i].end();
|
||||||
|
@ -425,6 +428,7 @@ int TGTriangle::run_triangulate( double angle, const int pass ) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// prep the output structures
|
// prep the output structures
|
||||||
out.pointlist = (REAL *) NULL; // Not needed if -N switch used.
|
out.pointlist = (REAL *) NULL; // Not needed if -N switch used.
|
||||||
|
|
Loading…
Reference in a new issue