A couple changes to allow separate handling of VASI/PAPI lights which
generally are turned on all the time.
This commit is contained in:
@@ -318,9 +318,10 @@ bool sgBinObjLoad( const string& path, const bool is_base,
|
|||||||
double *bounding_radius,
|
double *bounding_radius,
|
||||||
SGMaterialLib *matlib,
|
SGMaterialLib *matlib,
|
||||||
bool use_random_objects,
|
bool use_random_objects,
|
||||||
ssgBranch* geometry,
|
ssgBranch *geometry,
|
||||||
ssgBranch* rwy_lights,
|
ssgBranch *vasi_lights,
|
||||||
ssgBranch* taxi_lights,
|
ssgBranch *rwy_lights,
|
||||||
|
ssgBranch *taxi_lights,
|
||||||
ssgVertexArray *ground_lights )
|
ssgVertexArray *ground_lights )
|
||||||
{
|
{
|
||||||
SGBinObject obj;
|
SGBinObject obj;
|
||||||
@@ -351,7 +352,8 @@ bool sgBinObjLoad( const string& path, const bool is_base,
|
|||||||
group_list const& pts_n = obj.get_pts_n();
|
group_list const& pts_n = obj.get_pts_n();
|
||||||
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" ) {
|
||||||
|
// airport environment lighting
|
||||||
sgVec3 up;
|
sgVec3 up;
|
||||||
sgSetVec3( up, center->x(), center->y(), center->z() );
|
sgSetVec3( up, center->x(), center->y(), center->z() );
|
||||||
// returns a transform -> lod -> leaf structure
|
// returns a transform -> lod -> leaf structure
|
||||||
@@ -359,16 +361,17 @@ bool sgBinObjLoad( const string& path, const bool is_base,
|
|||||||
pts_v[i], pts_n[i],
|
pts_v[i], pts_n[i],
|
||||||
matlib,
|
matlib,
|
||||||
pt_materials[i], up );
|
pt_materials[i], up );
|
||||||
if ( pt_materials[i].substr(0, 16) == "RWY_BLUE_TAXIWAY_LIGHTS" ) {
|
if ( pt_materials[i] == "RWY_VASI_LIGHTS" ) {
|
||||||
taxi_lights->addKid( branch );
|
vasi_lights->addKid( branch );
|
||||||
} else if ( pt_materials[i].substr(0, 16)
|
} else if ( pt_materials[i] == "RWY_BLUE_TAXIWAY_LIGHTS"
|
||||||
== "RWY_GREEN_TAXIWAY_LIGHTS" )
|
|| pt_materials[i] == "RWY_GREEN_TAXIWAY_LIGHTS" )
|
||||||
{
|
{
|
||||||
taxi_lights->addKid( branch );
|
taxi_lights->addKid( branch );
|
||||||
} else {
|
} else {
|
||||||
rwy_lights->addKid( branch );
|
rwy_lights->addKid( branch );
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
// other geometry
|
||||||
material = pt_materials[i];
|
material = pt_materials[i];
|
||||||
tex_index.clear();
|
tex_index.clear();
|
||||||
ssgLeaf *leaf = sgMakeLeaf( path, GL_POINTS, matlib, material,
|
ssgLeaf *leaf = sgMakeLeaf( path, GL_POINTS, matlib, material,
|
||||||
|
|||||||
@@ -51,15 +51,16 @@ bool sgBinObjLoad( const string& path, const bool is_base,
|
|||||||
double *bounding_radius,
|
double *bounding_radius,
|
||||||
SGMaterialLib *matlib,
|
SGMaterialLib *matlib,
|
||||||
bool use_random_objects,
|
bool use_random_objects,
|
||||||
ssgBranch* geometry,
|
ssgBranch *geometry,
|
||||||
ssgBranch* rwy_lights,
|
ssgBranch *vasi_lights,
|
||||||
ssgBranch* taxi_lights,
|
ssgBranch *rwy_lights,
|
||||||
|
ssgBranch *taxi_lights,
|
||||||
ssgVertexArray *ground_lights );
|
ssgVertexArray *ground_lights );
|
||||||
|
|
||||||
// Generate an ocean tile
|
// Generate an ocean tile
|
||||||
bool sgGenTile( const string& path, SGBucket b,
|
bool sgGenTile( const string& path, SGBucket b,
|
||||||
Point3D *center, double *bounding_radius,
|
Point3D *center, double *bounding_radius,
|
||||||
SGMaterialLib *matlib, ssgBranch* geometry );
|
SGMaterialLib *matlib, ssgBranch *geometry );
|
||||||
|
|
||||||
|
|
||||||
#endif // _SG_OBJ_HXX
|
#endif // _SG_OBJ_HXX
|
||||||
|
|||||||
Reference in New Issue
Block a user