Ron Jensen: Fix stopway length and order and create proper stopway texture.
Thanks, Ron.
This commit is contained in:
parent
61ac48f3e5
commit
69eb4be737
2 changed files with 50 additions and 25 deletions
|
@ -337,10 +337,10 @@ static void build_runway( const TGRunway& rwy_info,
|
||||||
safe_base
|
safe_base
|
||||||
= gen_runway_area_w_extend( rwy_info, 0.0, 40.0, 0.0, 0.0, 40.0 );
|
= gen_runway_area_w_extend( rwy_info, 0.0, 40.0, 0.0, 0.0, 40.0 );
|
||||||
} else {
|
} else {
|
||||||
base = gen_runway_area_w_extend( rwy_info, 0.0, 20.0, -rwy_info.stopway1, -rwy_info.stopway2, 20.0 );
|
base = gen_runway_area_w_extend( rwy_info, 0.0, 20.0, -rwy_info.stopway1* SG_FEET_TO_METER, -rwy_info.stopway2* SG_FEET_TO_METER, 20.0 );
|
||||||
// also clear a safe area around the runway
|
// also clear a safe area around the runway
|
||||||
safe_base
|
safe_base
|
||||||
= gen_runway_area_w_extend( rwy_info, 0.0, 180.0, -rwy_info.stopway2, -rwy_info.stopway2, 50.0 );
|
= gen_runway_area_w_extend( rwy_info, 0.0, 180.0, -rwy_info.stopway1* SG_FEET_TO_METER, -rwy_info.stopway2* SG_FEET_TO_METER, 50.0 );
|
||||||
}
|
}
|
||||||
*apt_clearing = tgPolygonUnion(safe_base, *apt_clearing);
|
*apt_clearing = tgPolygonUnion(safe_base, *apt_clearing);
|
||||||
|
|
||||||
|
|
|
@ -103,33 +103,58 @@ void gen_runway_stopway( const TGRunway& rwy_info,
|
||||||
texparams_list *texparams,
|
texparams_list *texparams,
|
||||||
TGPolygon* accum ) {
|
TGPolygon* accum ) {
|
||||||
const float length = rwy_info.length / 2.0 + 2.0;
|
const float length = rwy_info.length / 2.0 + 2.0;
|
||||||
|
double start1_pct = 0.0;
|
||||||
|
double start2_pct = 0.0;
|
||||||
|
double end1_pct = 0.0;
|
||||||
|
double end2_pct = 0.0;
|
||||||
|
double part_len = 0.0;
|
||||||
|
|
||||||
|
int count=0;
|
||||||
|
int i=0;
|
||||||
|
|
||||||
if (rwy_info.stopway1 > 0.0) {
|
if (rwy_info.stopway1 > 0.0) {
|
||||||
/* Generate approach end stopway */
|
/* Generate approach end stopway */
|
||||||
gen_runway_section( rwy_info,
|
count = (int) (rwy_info.stopway1 * 2.0/ rwy_info.width);
|
||||||
runway_a,
|
if(count < 1) count = 1;
|
||||||
- rwy_info.stopway1 / length, 0,
|
part_len = rwy_info.stopway1 / (double) count;
|
||||||
0.0, 1.0,
|
for(i=0;i<count;i++)
|
||||||
0.0, 1.0, 0.0, 1.0,
|
{
|
||||||
rwy_info.heading,
|
start1_pct=end1_pct;
|
||||||
prefix,
|
end1_pct = start1_pct + ( part_len / length );
|
||||||
"tiedown",
|
gen_runway_section( rwy_info,
|
||||||
rwy_polys,
|
runway_b,
|
||||||
texparams,
|
- end1_pct, -start1_pct,
|
||||||
accum);
|
0.0, 1.0,
|
||||||
|
0.0, 1.0, 0.0, 1.0, //last number is lengthwise
|
||||||
|
rwy_info.heading + 180.0,
|
||||||
|
prefix,
|
||||||
|
"stopway",
|
||||||
|
rwy_polys,
|
||||||
|
texparams,
|
||||||
|
accum);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (rwy_info.stopway2 > 0.0) {
|
if (rwy_info.stopway2 > 0.0) {
|
||||||
/* Generate reciprocal end stopway */
|
/* Generate reciprocal end stopway */
|
||||||
gen_runway_section( rwy_info,
|
count = (int) (rwy_info.stopway2 * 2.0 / rwy_info.width);
|
||||||
runway_b,
|
if(count < 1) count = 1;
|
||||||
- rwy_info.stopway2 / length, 0,
|
part_len = rwy_info.stopway2 / (double) count;
|
||||||
0.0, 1.0,
|
for(i=0;i<count;i++)
|
||||||
0.0, 1.0, 0.0, 1.0,
|
{
|
||||||
rwy_info.heading + 180.0,
|
start2_pct=end2_pct;
|
||||||
prefix,
|
end2_pct = start2_pct + ( part_len / length );
|
||||||
"tiedown",
|
gen_runway_section( rwy_info,
|
||||||
rwy_polys,
|
runway_a,
|
||||||
texparams,
|
- end2_pct, -start2_pct,
|
||||||
accum);
|
0.0, 1.0,
|
||||||
|
0.0, 1.0, 0.0, 1.0,
|
||||||
|
rwy_info.heading,
|
||||||
|
prefix,
|
||||||
|
"stopway",
|
||||||
|
rwy_polys,
|
||||||
|
texparams,
|
||||||
|
accum);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue