- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgPlugins/3ds/WriterNodeVisitor.cpp
r13016 r13041 128 128 { 129 129 public: 130 PrimitiveIndexWriter(osg::Geometry * geo, 130 PrimitiveIndexWriter(osg::Geometry * geo, 131 131 ListTriangle & listTriangles, 132 132 unsigned int drawable_n, 133 unsigned int material) : 133 unsigned int material) : 134 134 osg::PrimitiveIndexFunctor(), 135 135 _drawable_n(drawable_n), … … 446 446 447 447 448 WriterNodeVisitor::WriterNodeVisitor(Lib3dsFile * file3ds, const std::string & fileName, 449 const osgDB::ReaderWriter::Options* options, 448 WriterNodeVisitor::WriterNodeVisitor(Lib3dsFile * file3ds, const std::string & fileName, 449 const osgDB::ReaderWriter::Options* options, 450 450 const std::string & srcDirectory) : 451 451 osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN), … … 598 598 if (is3DSName(_defaultValue, _extendedFilePaths, isNodeName)) 599 599 { 600 std::pair<NameMap::iterator, bool> insertion( nameMap.insert(_defaultValue) ); 600 std::pair<NameMap::iterator, bool> insertion( nameMap.insert(_defaultValue) ); 601 601 if (insertion.second) return _defaultValue; // Return if element is newly inserted in the map (else there is a naming collision) 602 602 } … … 654 654 if (is3DSName(strippedName, _extendedFilePaths, isNodeName)) 655 655 { 656 std::pair<NameMap::iterator, bool> insertion( nameMap.insert(strippedName) ); 656 std::pair<NameMap::iterator, bool> insertion( nameMap.insert(strippedName) ); 657 657 if (insertion.second) return strippedName; // Return if element is newly inserted in the map (else there is a naming collision) 658 658 } … … 740 740 } 741 741 742 /** 742 /** 743 743 * Add a vertice to the index and link it with the Triangle index and the drawable. 744 744 * \param index_vert is the map where the vertice are stored. … … 748 748 */ 749 749 unsigned int 750 WriterNodeVisitor::getMeshIndexForGeometryIndex(MapIndices & index_vert, 750 WriterNodeVisitor::getMeshIndexForGeometryIndex(MapIndices & index_vert, 751 751 unsigned int index, 752 752 unsigned int drawable_n) … … 763 763 764 764 765 void 765 void 766 766 WriterNodeVisitor::buildMesh(osg::Geode & geo, 767 767 const osg::Matrix & mat, … … 830 830 } 831 831 832 unsigned int 832 unsigned int 833 833 WriterNodeVisitor::calcVertices(osg::Geode & geo) 834 834 { … … 924 924 } 925 925 926 void 927 WriterNodeVisitor::createListTriangle(osg::Geometry * geo, 926 void 927 WriterNodeVisitor::createListTriangle(osg::Geometry * geo, 928 928 ListTriangle & listTriangles, 929 929 bool & texcoords, … … 947 947 } 948 948 949 int material = processStateSet(_currentStateSet.get()); 949 int material = processStateSet(_currentStateSet.get()); 950 950 951 951 for(unsigned int i = 0; i < geo->getNumPrimitiveSets(); ++i) //Fill the Triangle List
