From Tony Horrobin, "Attached is a small fix for the openflight loader with regard to road
segment and construction records. It just uses the id field to set the name of the osg node as with other types."
This commit is contained in:
@@ -35,9 +35,12 @@ class RoadSegment : public PrimaryRecord
|
||||
|
||||
virtual ~RoadSegment() {}
|
||||
|
||||
virtual void readRecord(RecordInputStream& /*in*/, Document& /*document*/)
|
||||
virtual void readRecord(RecordInputStream& in, Document& /*document*/)
|
||||
{
|
||||
_roadSegment = new osg::Group;
|
||||
std::string id = in.readString(8);
|
||||
|
||||
_roadSegment->setName(id);
|
||||
|
||||
// Add to parent.
|
||||
if (_parent.valid())
|
||||
@@ -70,10 +73,14 @@ class RoadConstruction : public PrimaryRecord
|
||||
|
||||
virtual ~RoadConstruction() {}
|
||||
|
||||
virtual void readRecord(RecordInputStream& /*in*/, Document& /*document*/)
|
||||
virtual void readRecord(RecordInputStream& in, Document& /*document*/)
|
||||
{
|
||||
_roadConstruction = new osg::Group;
|
||||
|
||||
std::string id = in.readString(8);
|
||||
|
||||
_roadConstruction->setName(id);
|
||||
|
||||
// Add to parent.
|
||||
if (_parent.valid())
|
||||
_parent->addChild(*_roadConstruction);
|
||||
|
||||
Reference in New Issue
Block a user