- Timestamp:
- 02/11/10 12:56:43 (3 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgPlugins/3ds/WriterNodeVisitor.h
r10945 r11056 42 42 #include "lib3ds/lib3ds.h" 43 43 #include "WriterCompareTriangle.h" 44 #include <set> 44 45 45 46 void copyOsgMatrixToLib3dsMatrix(Lib3dsMatrix lib3ds_matrix, const osg::Matrix& osg_matrix); … … 50 51 class WriterNodeVisitor: public osg::NodeVisitor 51 52 { 52 53 53 public: 54 54 static const unsigned int MAX_VERTICES = 65000; … … 57 57 WriterNodeVisitor(Lib3dsFile * file3ds, const std::string & fileName, 58 58 const osgDB::ReaderWriter::Options* options, 59 const std::string & srcDirectory) : 60 osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN), 61 _suceedLastApply(true), 62 _srcDirectory(srcDirectory), 63 file3ds(file3ds), 64 _currentStateSet(new osg::StateSet()), 65 _lastGeneratedNumberedName(0), 66 _lastMaterialIndex(0), 67 _lastMeshIndex(0), 68 _cur3dsNode(NULL), 69 options(options), 70 _imageCount(0) 71 { 72 //supportsOption("flipTexture", "flip texture upside-down"); 73 if (!fileName.empty()) 74 _directory = options->getDatabasePathList().empty() ? osgDB::getFilePath(fileName) : options->getDatabasePathList().front(); 75 } 59 const std::string & srcDirectory); 76 60 77 61 bool suceedLastApply() const; … … 216 200 StateSetStack _stateSetStack; 217 201 osg::ref_ptr<osg::StateSet> _currentStateSet; 218 std::map<std::string, unsigned int> _mapPrefix; 202 std::map<std::string, unsigned int> _mapPrefix; ///< List of next number to use in unique name generation, for each prefix 219 203 std::set<std::string> _nameMap; 220 204 MaterialMap _materialMap; 221 unsigned int _lastGeneratedNumberedName;222 205 unsigned int _lastMaterialIndex; 223 206 unsigned int _lastMeshIndex; … … 225 208 const osgDB::ReaderWriter::Options* options; 226 209 unsigned int _imageCount; 210 bool _extendedFilePaths; 211 std::set<osg::Image *> _imageSet; 227 212 }; 228 213
