1
0
Fork 0

Misc clean ups.

This commit is contained in:
curt 2002-10-06 04:27:24 +00:00
parent c162577340
commit cf96178ea8

View file

@ -1399,20 +1399,18 @@ bool fgBinObjLoad( const string& path, const bool is_base,
for ( i = 0; i < pts_v.size(); ++i ) { for ( i = 0; i < pts_v.size(); ++i ) {
// cout << "pts_v.size() = " << pts_v.size() << endl; // cout << "pts_v.size() = " << pts_v.size() << endl;
if ( pt_materials[i].substr(0, 3) == "RWY" ) { if ( pt_materials[i].substr(0, 3) == "RWY" ) {
material = "GROUND_LIGHTS";
is_lighting = true;
sgVec3 up; sgVec3 up;
sgSetVec3( up, center->x(), center->y(), center->z() ); sgSetVec3( up, center->x(), center->y(), center->z() );
ssgBranch *branch = gen_directional_lights( nodes, normals, ssgBranch *branch = gen_directional_lights( nodes, normals,
pts_v[i], pts_n[i], pts_v[i], pts_n[i],
up ); up );
float ranges[] = { 0, 12000 }; float ranges[] = { 0, 12000 };
// branch->setCallback( SSG_CALLBACK_PREDRAW, runway_lights_predraw ); branch->setCallback( SSG_CALLBACK_PREDRAW, runway_lights_predraw );
ssgRangeSelector * lod = new ssgRangeSelector; ssgRangeSelector * lod = new ssgRangeSelector;
lod->setRanges( ranges, 2 ); lod->setRanges( ranges, 2 );
lod->addKid( branch ); lod->addKid( branch );
rwy_lights->addKid( lod ); rwy_lights->addKid( lod );
} else { } else {
material = pt_materials[i]; material = pt_materials[i];
tex_index.clear(); tex_index.clear();
ssgLeaf *leaf = gen_leaf( path, GL_POINTS, material, ssgLeaf *leaf = gen_leaf( path, GL_POINTS, material,
@ -1420,9 +1418,6 @@ bool fgBinObjLoad( const string& path, const bool is_base,
pts_v[i], pts_n[i], tex_index, pts_v[i], pts_n[i], tex_index,
false, ground_lights ); false, ground_lights );
geometry->addKid( leaf ); geometry->addKid( leaf );
}
if ( is_lighting ) {
} }
} }