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:
Robert Osfield
2007-12-07 13:28:02 +00:00
parent 4c217b0d1c
commit ab7043ea45

View File

@@ -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);