Changeset 7756
- Timestamp:
- 01/04/08 12:26:21 (5 years ago)
- Location:
- OpenSceneGraph/trunk/src/osgPlugins/OpenFlight
- Files:
-
- 9 modified
-
ControlRecords.cpp (modified) (2 diffs)
-
Document.cpp (modified) (5 diffs)
-
Document.h (modified) (2 diffs)
-
GeometryRecords.cpp (modified) (4 diffs)
-
LightPointRecords.cpp (modified) (3 diffs)
-
PrimaryRecords.cpp (modified) (17 diffs)
-
Record.cpp (modified) (4 diffs)
-
Record.h (modified) (6 diffs)
-
RoadRecords.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/ControlRecords.cpp
r7748 r7756 39 39 META_Record(PushLevel) 40 40 41 virtual void readRecord(RecordInputStream& /*in*/, Document& document) 42 { 43 document.pushLevel(); 44 } 45 46 protected: 47 48 virtual ~PushLevel() {} 49 }; 50 51 RegisterRecordProxy<PushLevel> g_PushLevel(PUSH_LEVEL_OP); 52 53 54 /** PophLevel 55 */ 56 class PopLevel : public Record 57 { 58 public: 59 60 PopLevel() {} 61 62 META_Record(PopLevel) 63 41 64 virtual void read(RecordInputStream& /*in*/, Document& document) 42 65 { 43 document.pushLevel(); 44 } 45 46 protected: 47 48 virtual ~PushLevel() {} 49 }; 50 51 RegisterRecordProxy<PushLevel> g_PushLevel(PUSH_LEVEL_OP); 52 53 54 /** PophLevel 55 */ 56 class PopLevel : public Record 57 { 58 public: 59 60 PopLevel() {} 61 62 META_Record(PopLevel) 66 // Finally call dispose() for primary with push, pop level pair. 67 PrimaryRecord* primary = document.getTopOfLevelStack(); 68 if (primary) 69 { 70 primary->dispose(document); 71 } 72 73 document.popLevel(); 74 } 75 76 protected: 77 78 virtual ~PopLevel() {} 79 }; 80 81 RegisterRecordProxy<PopLevel> g_PopLevel(POP_LEVEL_OP); 82 83 84 /** PushSubface 85 */ 86 class PushSubface : public Record 87 { 88 public: 89 90 PushSubface() {} 91 92 META_Record(PushSubface) 63 93 64 94 virtual void read(RecordInputStream& /*in*/, Document& document) 65 95 { 66 document.p opLevel();67 } 68 69 protected: 70 71 virtual ~P opLevel() {}72 }; 73 74 RegisterRecordProxy<P opLevel> g_PopLevel(POP_LEVEL_OP);75 76 77 /** P ushSubface78 */ 79 class P ushSubface : public Record80 { 81 public: 82 83 P ushSubface() {}84 85 META_Record(P ushSubface)96 document.pushSubface(); 97 } 98 99 protected: 100 101 virtual ~PushSubface() {} 102 }; 103 104 RegisterRecordProxy<PushSubface> g_PushSubface(PUSH_SUBFACE_OP); 105 106 107 /** PopSubface 108 */ 109 class PopSubface : public Record 110 { 111 public: 112 113 PopSubface() {} 114 115 META_Record(PopSubface) 86 116 87 117 virtual void read(RecordInputStream& /*in*/, Document& document) 88 118 { 89 document.pushSubface();90 }91 92 protected:93 94 virtual ~PushSubface() {}95 };96 97 RegisterRecordProxy<PushSubface> g_PushSubface(PUSH_SUBFACE_OP);98 99 100 /** PopSubface101 */102 class PopSubface : public Record103 {104 public:105 106 PopSubface() {}107 108 META_Record(PopSubface)109 110 virtual void read(RecordInputStream& /*in*/, Document& document)111 {112 119 document.popSubface(); 113 120 } … … 182 189 { 183 190 readRecord(in,document); 184 // in().seekg(in.getEndOfRecord(), std::ios_base::beg);185 // loop until PopAttribute186 187 191 } 188 192 -
OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/Document.cpp
r7748 r7756 47 47 } 48 48 49 50 49 Document::~Document() 51 50 { 52 51 } 53 52 54 55 53 void Document::pushLevel() 56 54 { 57 55 _levelStack.push_back(_currentPrimaryRecord.get()); 58 _levelStack.back()->pushLevel(*this);59 56 _level++; 60 57 } 61 58 62 63 59 void Document::popLevel() 64 60 { 65 _levelStack.back()->popLevel(*this);66 61 _levelStack.pop_back(); 67 62 68 63 if (!_levelStack.empty()) 69 _currentPrimaryRecord = _levelStack.back() .get();64 _currentPrimaryRecord = _levelStack.back(); 70 65 71 66 if (--_level<=0) 72 67 _done = true; 73 68 } 74 75 69 76 70 void Document::pushSubface() … … 79 73 } 80 74 81 82 75 void Document::popSubface() 83 76 { 84 77 _subfaceLevel--; 85 78 } 86 87 79 88 80 void Document::pushExtension() … … 96 88 _extensionStack.push_back(_currentPrimaryRecord.get()); 97 89 } 98 99 90 100 91 void Document::popExtension() … … 110 101 } 111 102 112 113 103 osg::Node* Document::getInstanceDefinition(int no) 114 104 { … … 119 109 return NULL; 120 110 } 121 122 111 123 112 double flt::unitsToMeters(CoordUnits unit) -
OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/Document.h
r7748 r7756 97 97 98 98 // Current primar record 99 void setCurrentPrimaryRecord(PrimaryRecord* record) { _currentPrimaryRecord=record; }99 void setCurrentPrimaryRecord(PrimaryRecord* record) { _currentPrimaryRecord=record; } 100 100 PrimaryRecord* getCurrentPrimaryRecord() { return _currentPrimaryRecord.get(); } 101 101 const PrimaryRecord* getCurrentPrimaryRecord() const { return _currentPrimaryRecord.get(); } … … 113 113 void pushExtension(); 114 114 void popExtension(); 115 116 115 117 116 void setHeaderNode(osg::Node* node) { _osgHeader = node; } -
OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/GeometryRecords.cpp
r7748 r7756 73 73 META_setID(_geode) 74 74 META_setComment(_geode) 75 META_setMatrix(_geode)76 75 META_setMultitexture(_geode) 77 76 … … 435 434 } 436 435 437 virtual void popLevel(Document& document)436 virtual void dispose(Document& document) 438 437 { 439 438 if (_geode.valid()) 440 439 { 440 // Insert transform(s) 441 if (_matrix.valid()) 442 { 443 insertMatrixTransform(*_geode,*_matrix,_numberOfReplications); 444 } 445 446 // Add primitives, set bindings etc. 441 447 for (unsigned int i=0; i<_geode->getNumDrawables(); ++i) 442 448 { … … 729 735 META_setID(_geode) 730 736 META_setComment(_geode) 731 META_setMatrix(_geode)732 737 META_setMultitexture(_geode) 733 738 … … 965 970 } 966 971 967 virtual void popLevel(Document& document)972 virtual void dispose(Document& document) 968 973 { 969 974 if (_geode.valid()) 970 975 { 976 // Insert transform(s) 977 if (_matrix.valid()) 978 { 979 insertMatrixTransform(*_geode,*_matrix,_numberOfReplications); 980 } 981 971 982 osg::StateSet* stateset = _geode->getOrCreateStateSet(); 972 983 -
OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/LightPointRecords.cpp
r7748 r7756 114 114 META_setID(_lpn) 115 115 META_setComment(_lpn) 116 META_ setMatrix(_lpn)116 META_dispose(_lpn) 117 117 118 118 // Add lightpoint, add two if bidirectional. … … 264 264 META_setID(_lpn) 265 265 META_setComment(_lpn) 266 META_ setMatrix(_lpn)266 META_dispose(_lpn) 267 267 268 268 // Add lightpoint, add two if bidirectional. … … 482 482 } 483 483 484 virtual void popLevel(Document& document) 485 { 484 virtual void dispose(Document& document) 485 { 486 if (!_switch.valid()) return; 487 488 // Insert transform(s) 489 if (_matrix.valid()) 490 { 491 insertMatrixTransform(*_switch,*_matrix,_numberOfReplications); 492 } 493 486 494 // Set default sets: 0 for all off, 1 for all on 487 495 _switch->setAllChildrenOff( 0 ); -
OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/PrimaryRecords.cpp
r7748 r7756 55 55 META_setID(_header) 56 56 META_setComment(_header) 57 // META_setMatrix(_header)58 57 META_setMultitexture(_header) 59 58 META_addChild(_header) … … 133 132 } 134 133 135 virtual void popLevel(Document& document)134 virtual void dispose(Document& document) 136 135 { 137 136 if (_header.valid()) … … 187 186 META_setID(_group) 188 187 META_setComment(_group) 189 META_setMatrix(_group)190 188 META_setMultitexture(_group) 191 189 META_addChild(_group) … … 237 235 } 238 236 239 virtual void popLevel(Document& document) 240 { 237 virtual void dispose(Document& document) 238 { 239 if (!_group.valid()) return; 240 241 // Insert transform(s) 242 if (_matrix.valid()) 243 { 244 insertMatrixTransform(*_group,*_matrix,_numberOfReplications); 245 } 246 241 247 // Children are added! 242 248 osg::Sequence* sequence = dynamic_cast<osg::Sequence*>(_group.get()); … … 319 325 META_setID(_dof) 320 326 META_setComment(_dof) 321 META_setMatrix(_dof)322 327 META_setMultitexture(_dof) 323 328 META_addChild(_dof) 329 META_dispose(_dof) 324 330 325 331 protected: 326 332 327 333 virtual ~DegreeOfFreedom() {} 328 329 334 virtual void readRecord(RecordInputStream& in, Document& document) 330 335 { … … 454 459 META_setID(_lod) 455 460 META_setComment(_lod) 456 META_setMatrix(_lod)457 461 META_setMultitexture(_lod) 458 462 META_addChild(_impChild0) 463 META_dispose(_lod) 459 464 460 465 protected: 461 466 462 467 virtual ~LevelOfDetail() {} 463 464 468 virtual void readRecord(RecordInputStream& in, Document& document) 465 469 { … … 510 514 META_setID(_lod) 511 515 META_setComment(_lod) 512 META_setMatrix(_lod)513 516 META_setMultitexture(_lod) 514 517 META_addChild(_impChild0) 518 META_dispose(_lod) 515 519 516 520 protected: 517 521 518 522 virtual ~OldLevelOfDetail() {} 519 520 523 virtual void readRecord(RecordInputStream& in, Document& document) 521 524 { … … 571 574 META_setID(_multiSwitch) 572 575 META_setComment(_multiSwitch) 573 META_setMatrix(_multiSwitch)574 576 META_setMultitexture(_multiSwitch) 577 META_dispose(_multiSwitch) 575 578 576 579 virtual void addChild(osg::Node& child) … … 594 597 595 598 virtual ~Switch() {} 596 597 599 virtual void readRecord(RecordInputStream& in, Document& /*document*/) 598 600 { … … 653 655 META_setID(_external) 654 656 META_setComment(_external) 655 META_setMatrix(_external)656 657 META_setMultitexture(_external) 657 658 META_addChild(_external) 659 META_dispose(_external) 658 660 659 661 protected: 660 662 661 663 virtual ~ExternalReference() {} 662 663 664 virtual void readRecord(RecordInputStream& in, Document& document) 664 665 { … … 718 719 class InstanceDefinition : public PrimaryRecord 719 720 { 721 int _number; 720 722 osg::ref_ptr<osg::Group> _instanceDefinition; 721 723 722 724 public: 723 725 724 InstanceDefinition() {}726 InstanceDefinition():_number(0) {} 725 727 726 728 META_Record(InstanceDefinition) … … 731 733 META_addChild(_instanceDefinition) 732 734 733 virtual void setMatrix(osg::Matrix& matrix)734 {735 osg::ref_ptr<osg::MatrixTransform> transform = new osg::MatrixTransform(matrix);736 transform->setDataVariance(osg::Object::STATIC);737 transform->addChild(_instanceDefinition.get());738 _instanceDefinition = transform.get();739 }740 741 735 protected: 742 736 743 737 virtual ~InstanceDefinition() {} 744 745 738 virtual void readRecord(RecordInputStream& in, Document& document) 746 739 { 747 740 in.forward(2); 748 uint16 number =in.readUInt16();741 _number = (int)in.readUInt16(); 749 742 750 743 _instanceDefinition = new osg::Group; 744 } 745 746 virtual void dispose(Document& document) 747 { 748 // Insert transform(s) 749 if (_matrix.valid()) 750 { 751 osg::ref_ptr<osg::MatrixTransform> transform = new osg::MatrixTransform(*_matrix); 752 transform->setDataVariance(osg::Object::STATIC); 753 transform->addChild(_instanceDefinition.get()); 754 _instanceDefinition = transform.get(); 755 } 751 756 752 757 // Add to instance definition table. 753 document.setInstanceDefinition(number,_instanceDefinition.get()); 754 } 758 document.setInstanceDefinition(_number,_instanceDefinition.get()); 759 } 760 755 761 }; 756 762 … … 772 778 773 779 virtual ~InstanceReference() {} 774 775 780 virtual void readRecord(RecordInputStream& in, Document& document) 776 781 { … … 782 787 783 788 // Add this implementation to parent implementation. 784 if (_parent.valid() )789 if (_parent.valid() && instance) 785 790 _parent->addChild(*instance); 786 791 } … … 804 809 META_setID(_extension) 805 810 META_setComment(_extension) 806 META_setMatrix(_extension)807 811 META_setMultitexture(_extension) 808 812 META_addChild(_extension) 813 META_dispose(_extension) 809 814 810 815 protected: 811 816 812 817 virtual ~Extension() {} 813 814 818 virtual void readRecord(RecordInputStream& in, Document& /*document*/) 815 819 { … … 851 855 META_setID(_object) 852 856 META_setComment(_object) 853 854 virtual void setMatrix(osg::Matrix& matrix) 855 { 856 if (_object.valid()) 857 insertMatrixTransform(*_object,matrix); 857 META_addChild(_object) 858 859 protected: 860 861 virtual void readRecord(RecordInputStream& in, Document& document) 862 { 863 std::string id = in.readString(8); 864 /*uint32 flags =*/ in.readUInt32(); 865 866 _object = new osg::Group; 867 _object->setName(id); 868 869 // Postpone add-to-parent until we know a bit more. 870 } 871 872 virtual void dispose(Document& document) 873 { 874 if (!_parent.valid() || !_object.valid()) return; 875 876 // Is it safe to remove _object? 877 if (!document.getPreserveObject() && isSafeToRemoveObject() && !_matrix.valid()) 878 { 879 // Add children of _object to parent. 880 // _object will not be added to graph. 881 for (unsigned int i=0; i<_object->getNumChildren(); ++i) 882 { 883 _parent->addChild(*(_object->getChild(i))); 884 } 885 } 858 886 else 859 887 { 860 _object = new osg::MatrixTransform(matrix); 861 _object->setDataVariance(osg::Object::STATIC); 862 863 if (_parent.valid()) 864 _parent->addChild(*_object); 865 } 866 } 867 868 virtual void addChild(osg::Node& child) 869 { 870 // If object excists it means it is preserved. 871 if (_object.valid()) 872 _object->addChild(&child); 873 // If no object add child to parent. 874 else if (_parent.valid()) 875 _parent->addChild(child); 876 } 877 878 protected: 879 880 virtual ~Object() {} 881 882 virtual void readRecord(RecordInputStream& in, Document& document) 883 { 884 // Is it safe to remove the object? 885 if (!document.getPreserveObject()) 886 { 887 // The following tests need a valid parent. 888 if (!_parent.valid()) 889 return; 890 888 _parent->addChild(*_object); 889 } 890 891 // Insert transform(s) 892 if (_matrix.valid()) 893 { 894 insertMatrixTransform(*_object,*_matrix,_numberOfReplications); 895 } 896 } 897 898 bool isSafeToRemoveObject() const 899 { 900 // The following tests need a valid parent. 901 if (_parent.valid()) 902 { 891 903 // LODs adds an empty child group so it is safe to remove this object record. 892 904 if (typeid(*_parent)==typeid(flt::LevelOfDetail)) 893 return ;905 return true; 894 906 895 907 if (typeid(*_parent)==typeid(flt::OldLevelOfDetail)) 896 return ;908 return true; 897 909 898 910 // If parent is a Group record we have to check for animation. 899 911 Group* parentGroup = dynamic_cast<flt::Group*>(_parent.get()); 900 912 if (parentGroup && !parentGroup->hasAnimation()) 901 return; 902 } 903 904 std::string id = in.readString(8); 905 _object = new osg::Group; 906 _object->setName(id); 907 908 909 #if 1 910 /*uint32 flags =*/ in.readUInt32(); 911 #else 912 913 // The Object "Flat Shaded" checkbox in Creator is used by the "Calculate Shading" operation, 914 // it is not a flat shaded state attribute. 915 916 uint32 flags = in.readUInt32(); 917 // Flat shaded? 918 if (flags & FLAT_SHADED) 919 { 920 static osg::ref_ptr<osg::ShadeModel> shademodel; 921 if (!shademodel.valid()) 922 { 923 shademodel = new osg::ShadeModel; 924 shademodel->setMode(osg::ShadeModel::FLAT); 925 } 926 _object->getOrCreateStateSet()->setAttribute(shademodel.get()); 927 } 928 #endif 929 if (_parent.valid()) 930 _parent->addChild(*_object); 931 } 913 return true; 914 } 915 916 return false; 917 } 918 932 919 }; 933 920 … … 953 940 META_setID(_lightSource) 954 941 META_setComment(_lightSource) 955 META_ setMatrix(_lightSource)942 META_dispose(_lightSource) 956 943 957 944 protected: 958 945 959 946 virtual ~LightSource() {} 960 961 947 virtual void readRecord(RecordInputStream& in, Document& document) 962 948 { -
OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/Record.cpp
r7748 r7756 31 31 } 32 32 33 Record::~Record()34 {35 }36 37 void Record::setParent(PrimaryRecord* parent)38 {39 _parent = parent;40 }41 42 //PrimaryRecord& Record::parent()43 //{44 // if (!_parent)45 // throw std::runtime_error("Record::parent(): invalid pointer to parent exception.");46 //47 // return *_parent;48 //}49 50 51 33 void Record::read(RecordInputStream& in, Document& document) 52 34 { 53 setParent(document.getCurrentPrimaryRecord());35 _parent = document.getCurrentPrimaryRecord(); 54 36 55 37 // Read record body. … … 57 39 } 58 40 59 60 41 void Record::readRecord(RecordInputStream& /*in*/, Document& /*document*/) 61 42 { 62 43 } 63 64 44 65 45 PrimaryRecord::PrimaryRecord() : … … 68 48 } 69 49 70 71 50 void PrimaryRecord::read(RecordInputStream& in, Document& document) 72 51 { 73 setParent(document.getTopOfLevelStack()); 52 PrimaryRecord* parentPrimary = document.getTopOfLevelStack(); 53 PrimaryRecord* currentPrimary = document.getCurrentPrimaryRecord(); 74 54 75 // Update primary record. 55 // Finally call dispose() for primary without push, pop level pair. 56 if (currentPrimary && currentPrimary!=parentPrimary) 57 { 58 currentPrimary->dispose(document); 59 } 60 61 // Update current primary record. 76 62 document.setCurrentPrimaryRecord(this); 63 64 _parent = parentPrimary; 77 65 78 66 // Read record body. … … 83 71 // Helper methods 84 72 85 // Insert matrix-tranform above node. 86 // Return transform. 87 osg::ref_ptr<osg::MatrixTransform> flt::insertMatrixTransform(osg::Node& node, const osg::Matrix& matrix) 73 // Insert matrix-tranform(s) 74 // 75 // node: node to apply transform 76 // matrix: transformation matrix 77 // numberOfReplications: zero for regular transform, number of copies if replication is used. 78 void flt::insertMatrixTransform(osg::Node& node, const osg::Matrix& matrix, int numberOfReplications) 88 79 { 89 80 osg::ref_ptr<osg::Node> ref = &node; 90 osg::ref_ptr<osg::MatrixTransform> transform = new osg::MatrixTransform(matrix); 91 transform->setDataVariance(osg::Object::STATIC); 81 osg::Node::ParentList parents = node.getParents(); 92 82 93 // Replace parent 94 osg::Node::ParentList parents = node.getParents(); 83 // Disconnect node from parents. 95 84 for (osg::Node::ParentList::iterator itr=parents.begin(); 96 85 itr!=parents.end(); 97 86 ++itr) 98 87 { 99 (*itr)->re placeChild(&node,transform.get());88 (*itr)->removeChild(&node); 100 89 } 101 90 102 // Make primary a child of matrix transform.103 transform->addChild(&node);91 // Start without transformation if replication. 92 osg::Matrix accumulatedMatrix = (numberOfReplications > 0)? osg::Matrix::identity() : matrix; 104 93 105 return transform; 94 for (int n=0; n<=numberOfReplications; n++) 95 { 96 // Accumulate transformation for each replication. 97 osg::ref_ptr<osg::MatrixTransform> transform = new osg::MatrixTransform(accumulatedMatrix); 98 transform->setDataVariance(osg::Object::STATIC); 99 100 // Add transform to parents 101 for (osg::Node::ParentList::iterator itr=parents.begin(); 102 itr!=parents.end(); 103 ++itr) 104 { 105 (*itr)->addChild(transform.get()); 106 } 107 108 // Make primary a child of matrix transform. 109 transform->addChild(&node); 110 111 // Accumulate transform if multiple replications. 112 accumulatedMatrix *= matrix; 113 } 106 114 } 107 115 -
OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/Record.h
r7748 r7756 43 43 #define META_setID(imp) virtual void setID(const std::string& id) { if (imp.valid()) imp->setName(id); } 44 44 #define META_setComment(imp) virtual void setComment(const std::string& id) { if (imp.valid()) imp->addDescription(id); } 45 #define META_setMatrix(imp) virtual void setMatrix(osg::Matrix& matrix) { if (imp.valid()) insertMatrixTransform(*imp,matrix); }46 45 #define META_setMultitexture(imp) virtual void setMultitexture(osg::StateSet& multitexture) { if (imp.valid()) imp->getOrCreateStateSet()->merge(multitexture); } 47 46 #define META_addChild(imp) virtual void addChild(osg::Node& child) { if (imp.valid()) imp->addChild(&child); } 48 47 #define META_dispose(imp) virtual void dispose(Document&) { if (imp.valid() && _matrix.valid()) insertMatrixTransform(*imp,*_matrix,_numberOfReplications); } 49 48 50 49 // pure virtual base class … … 63 62 protected: 64 63 65 virtual ~Record() ;64 virtual ~Record() {} 66 65 67 66 virtual void readRecord(RecordInputStream& in, Document& document); … … 78 77 79 78 virtual void read(RecordInputStream& in, Document& document); 80 virtual void pushLevel(Document& /*document*/) {} 81 virtual void popLevel(Document& /*document*/) {} 79 virtual void dispose(Document& /*document*/) {} 82 80 83 81 // Ancillary operations 84 82 virtual void setID(const std::string& /*id*/) {} 85 83 virtual void setComment(const std::string& /*comment*/) {} 86 virtual void setMatrix(osg::Matrix& /*matrix*/) {}87 84 virtual void setMultitexture(osg::StateSet& /*multitexture*/) {} 88 85 virtual void addChild(osg::Node& /*child*/) {} … … 92 89 93 90 void setNumberOfReplications(int num) { _numberOfReplications = num; } 91 void setMatrix(const osg::Matrix& matrix) { _matrix = new osg::RefMatrix(matrix); } 94 92 95 93 void setLocalVertexPool(VertexList* pool) { _localVertexPool = pool; } … … 101 99 102 100 int _numberOfReplications; 101 osg::ref_ptr<osg::RefMatrix> _matrix; 103 102 osg::ref_ptr<VertexList> _localVertexPool; 104 103 }; … … 121 120 122 121 123 osg::ref_ptr<osg::MatrixTransform> insertMatrixTransform(osg::Node& node, const osg::Matrix& matrix);122 void insertMatrixTransform(osg::Node& node, const osg::Matrix& matrix, int numberOfReplications); 124 123 125 124 osg::Vec3Array* getOrCreateVertexArray(osg::Geometry& geometry); -
OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/RoadRecords.cpp
r7748 r7756 41 41 META_setID(_roadSegment) 42 42 META_setComment(_roadSegment) 43 META_setMatrix(_roadSegment)44 43 META_setMultitexture(_roadSegment) 45 44 META_addChild(_roadSegment) 45 META_dispose(_roadSegment) 46 46 47 47 protected: 48 48 49 49 virtual ~RoadSegment() {} 50 51 50 virtual void readRecord(RecordInputStream& in, Document& /*document*/) 52 51 { … … 79 78 META_setID(_roadConstruction) 80 79 META_setComment(_roadConstruction) 81 META_setMatrix(_roadConstruction)82 80 META_setMultitexture(_roadConstruction) 83 81 META_addChild(_roadConstruction) 82 META_dispose(_roadConstruction) 84 83 85 84 protected: 86 85 87 86 virtual ~RoadConstruction() {} 88 89 87 virtual void readRecord(RecordInputStream& in, Document& /*document*/) 90 88 { … … 118 116 META_setID(_roadPath) 119 117 META_setComment(_roadPath) 120 META_setMatrix(_roadPath)121 118 META_setMultitexture(_roadPath) 122 119 META_addChild(_roadPath) 120 META_dispose(_roadPath) 123 121 124 122 protected: 125 123 126 124 virtual ~RoadPath() {} 127 128 125 virtual void readRecord(RecordInputStream& /*in*/, Document& /*document*/) 129 126 {
