- fixed t-junctions in roads - I was adding intermediate nodes after adding verticies from
neighboring tiles, but before adding the nodes from the result of clipping.
This commit is contained in:
parent
ffc9db1b82
commit
7e1257ed8a
1 changed files with 10 additions and 8 deletions
|
@ -574,7 +574,7 @@ void TGConstruct::add_intermediate_nodes( ) {
|
||||||
after = current.total_size();
|
after = current.total_size();
|
||||||
|
|
||||||
if (before != after) {
|
if (before != after) {
|
||||||
SG_LOG( SG_CLIPPER, SG_INFO, "Fixed t-juntions is " << get_area_name( (AreaType)i ) << ":" << j << " of " << (int)polys_clipped.superpolys[i].size() << " nodes increased from " << before << " to " << after );
|
SG_LOG( SG_CLIPPER, SG_INFO, "Fixed t-juntions in " << get_area_name( (AreaType)i ) << ":" << j << " of " << (int)polys_clipped.superpolys[i].size() << " nodes increased from " << before << " to " << after );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Save it back */
|
/* Save it back */
|
||||||
|
@ -625,6 +625,7 @@ void TGConstruct::fix_point_heights()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
// now flatten some stuuf
|
// now flatten some stuuf
|
||||||
for (int i = 0; i < TG_MAX_AREA_TYPES; i++) {
|
for (int i = 0; i < TG_MAX_AREA_TYPES; i++) {
|
||||||
if ( is_lake_area( (AreaType)i ) ) {
|
if ( is_lake_area( (AreaType)i ) ) {
|
||||||
|
@ -779,6 +780,7 @@ void TGConstruct::fix_point_heights()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
TGPolygon TGConstruct::area_tex_coords( const TGPolygon& tri )
|
TGPolygon TGConstruct::area_tex_coords( const TGPolygon& tri )
|
||||||
|
@ -1323,13 +1325,6 @@ void TGConstruct::construct_bucket( SGBucket b ) {
|
||||||
// SG_LOG(SG_GENERAL, SG_ALERT, "NODE LIST AFTER ADDING SHARED EDGES" );
|
// SG_LOG(SG_GENERAL, SG_ALERT, "NODE LIST AFTER ADDING SHARED EDGES" );
|
||||||
// dump_nodes( c );
|
// dump_nodes( c );
|
||||||
|
|
||||||
// Step 4) Add intermediate nodes
|
|
||||||
// need to add another add intermediate nodes function that can handle the new node class
|
|
||||||
add_intermediate_nodes();
|
|
||||||
|
|
||||||
// After adding intermediate nodes, clean the polys
|
|
||||||
clean_clipped_polys();
|
|
||||||
|
|
||||||
for (int i = 0; i < TG_MAX_AREA_TYPES; i++) {
|
for (int i = 0; i < TG_MAX_AREA_TYPES; i++) {
|
||||||
for (int j = 0; j < (int)polys_clipped.superpolys[i].size(); ++j ) {
|
for (int j = 0; j < (int)polys_clipped.superpolys[i].size(); ++j ) {
|
||||||
TGPolygon poly = polys_clipped.superpolys[i][j].get_poly();
|
TGPolygon poly = polys_clipped.superpolys[i][j].get_poly();
|
||||||
|
@ -1345,6 +1340,13 @@ void TGConstruct::construct_bucket( SGBucket b ) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Step 4) Add intermediate nodes
|
||||||
|
// need to add another add intermediate nodes function that can handle the new node class
|
||||||
|
add_intermediate_nodes();
|
||||||
|
|
||||||
|
// After adding intermediate nodes, clean the polys
|
||||||
|
clean_clipped_polys();
|
||||||
|
|
||||||
// SG_LOG(SG_GENERAL, SG_ALERT, "NODE LIST AFTER ADDING CLIPPED POLYS" );
|
// SG_LOG(SG_GENERAL, SG_ALERT, "NODE LIST AFTER ADDING CLIPPED POLYS" );
|
||||||
// dump_nodes( c );
|
// dump_nodes( c );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue