Remove texture coordinates length calculations from certain places.
The width calculation is corrected now and should fix distorted runway textures. Hopefully we can get rid of this width mumbo-jumbo soon, too. It has to stay for now as I found no solution.
This commit is contained in:
parent
1663620e35
commit
dc3449a860
3 changed files with 6 additions and 15 deletions
|
@ -232,16 +232,13 @@ void gen_tex_section( const TGPolygon& runway,
|
|||
// potential artifacts and we may add or remove points and need to
|
||||
// do new texture coordinate calcs later.
|
||||
|
||||
// we add 0.5m to the length for texture overlap. This puts the
|
||||
// lines on the texture back to the edge of the runway where they
|
||||
// belong.
|
||||
double len = length / 2.0 + 0.5;
|
||||
double len = length / 2.0;
|
||||
double sect_len = len * ( endl_pct - startl_pct );
|
||||
|
||||
// we add 0.5m to both sides of the runway (4' total) for texture
|
||||
// we add 0.6m to both sides of the runway (1.2m total) for texture
|
||||
// overlap. This puts the lines on the texture back to the edge
|
||||
// of the runway where they belong.
|
||||
double wid = width + 0.5;
|
||||
double wid = width + 1.2;
|
||||
double sect_wid = wid * ( endw_pct - startw_pct );
|
||||
|
||||
TGTexParams tp;
|
||||
|
|
|
@ -109,7 +109,7 @@ void Runway::gen_rw_marking( const TGPolygon& runway,
|
|||
}
|
||||
|
||||
//Now create the sections of the runway type
|
||||
double length = rwy.length / 2.0 + 0.5;
|
||||
double length = rwy.length / 2.0;
|
||||
|
||||
for ( int i=0; i < rw_marking_list.size(); ++i) {
|
||||
SG_LOG(SG_GENERAL, SG_INFO, "Runway section texture = " << rw_marking_list[i].tex << " lenght: " << rw_marking_list[i].size);
|
||||
|
@ -184,10 +184,7 @@ for ( int rwhalf=0; rwhalf<2; ++rwhalf ){
|
|||
SG_LOG(SG_GENERAL, SG_DEBUG, " point = " << p);
|
||||
}
|
||||
|
||||
// we add 0.5m to the length for texture overlap. This puts the
|
||||
// lines on the texture back to the edge of the runway where they
|
||||
// belong.
|
||||
double length = rwy.length / 2.0 + 0.5;
|
||||
double length = rwy.length / 2.0;
|
||||
if ( length < 3075 * SG_FEET_TO_METER ) {
|
||||
SG_LOG( SG_GENERAL, SG_ALERT,
|
||||
"Runway " << rwy.rwnum[0] << " is not long enough ("
|
||||
|
|
|
@ -67,10 +67,7 @@ for ( int rwhalf=0; rwhalf<2; ++rwhalf ){
|
|||
runway_half.add_node( 0, runway.get_pt(0, 5) );
|
||||
}
|
||||
|
||||
// we add 0.5m to the length for texture overlap. This puts the
|
||||
// lines on the texture back to the edge of the runway where they
|
||||
// belong.
|
||||
double length = rwy.length / 2.0 + 0.5;
|
||||
double length = rwy.length / 2.0;
|
||||
double start1_pct = 0.0;
|
||||
double end1_pct = 0.0;
|
||||
double heading = 0.0;
|
||||
|
|
Loading…
Add table
Reference in a new issue