Changeset 8563
- Timestamp:
- 07/11/08 19:41:50
- Files:
-
- OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/AncillaryRecords.cpp (modified) (1 diff)
- OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/Document.cpp (modified) (1 diff)
- OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/Document.h (modified) (1 diff)
- OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/ExportOptions.cpp (modified) (1 diff)
- OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/FltExportVisitor.cpp (modified) (6 diffs)
- OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/PaletteRecords.cpp (modified) (1 diff)
- OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/Pools.h (modified) (1 diff)
- OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/PrimaryRecords.cpp (modified) (1 diff)
- OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/RecordInputStream.cpp (modified) (1 diff)
- OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/VertexPaletteManager.cpp (modified) (3 diffs)
- OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/VertexRecords.cpp (modified) (1 diff)
- OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/expAncillaryRecords.cpp (modified) (2 diffs)
- OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/expGeometryRecords.cpp (modified) (2 diffs)
- OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/expPrimaryRecords.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/AncillaryRecords.cpp
r7748 r8563 243 243 float32 v = in.readFloat32(); 244 244 245 // Add texture coo dinates to geometry.245 // Add texture coordinates to geometry. 246 246 if (_parent.valid()) 247 247 _parent->addVertexUV(layer,osg::Vec2(u,v)); OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/Document.cpp
r7931 r8563 95 95 if (!_currentPrimaryRecord.valid()) 96 96 { 97 osg::notify(osg::WARN) << "Can't de scide primary in Document::popExtension()." << std::endl;97 osg::notify(osg::WARN) << "Can't decide primary in Document::popExtension()." << std::endl; 98 98 return; 99 99 } OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/Document.h
r8003 r8563 96 96 const osgDB::ReaderWriter::Options* getOptions() const { return _options.get(); } 97 97 98 // Current primar record98 // Current primary record 99 99 void setCurrentPrimaryRecord(PrimaryRecord* record) { _currentPrimaryRecord=record; } 100 100 PrimaryRecord* getCurrentPrimaryRecord() { return _currentPrimaryRecord.get(); } OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/ExportOptions.cpp
r8010 r8563 75 75 /** Value: "stripTextureFilePath". 76 76 * If present in the Options string, the exporter strips the path from 77 * texture file names, and writes only the tex ure file name to the FLT77 * texture file names, and writes only the texture file name to the FLT 78 78 * Texture Palette. By default, the exporter doesn't strip the path, 79 79 * and the name written to the Texture Palette is taken directly from OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/FltExportVisitor.cpp
r8301 r8563 103 103 104 104 105 // Temp file for storing records. Need a temp file because we candon't105 // Temp file for storing records. Need a temp file because we don't 106 106 // write header and palette until FltExportVisitor completes traversal. 107 107 _recordsTempName = fltOpt->getTempDir() + "/ofw_temp_records"; … … 148 148 // Header record -- Don't need to support this here. We always output a header. 149 149 // Group record -- HIGH 150 // Child of an LOD node -- HIGH Cur ently write out a Group record regardless.150 // Child of an LOD node -- HIGH Currently write out a Group record regardless. 151 151 // InstanceDefinition/InstanceReference -- MED -- multiparented Group is an instance 152 152 // Extension record -- MED … … 213 213 ScopedStatePushPop guard( this, lodNode.getStateSet() ); 214 214 215 // LOD center - same for all chil rden215 // LOD center - same for all children 216 216 osg::Vec3d center = lodNode.getCenter(); 217 217 … … 240 240 { 241 241 // Importer reads a Matrix record and inserts a MatrixTransform above 242 // the c orrent node. We need to do the opposite: Write a Matrix record242 // the current node. We need to do the opposite: Write a Matrix record 243 243 // as an ancillary record for each child. We do that by storing the 244 244 // MatrixTransform in each child's UserData. Each child then checks … … 454 454 { 455 455 // Unknown Node. Warn and return. 456 // (Note, if the base class of this Node was a Grou o, then apply(Group&)456 // (Note, if the base class of this Node was a Group, then apply(Group&) 457 457 // would export a Group record then continue traversal. Because we are 458 458 // a Node, there's no way to continue traversal, so just return.) … … 487 487 _recordsStr.close(); 488 488 489 // Write OpenFlight file front matter: he qader, vertex palette, etc.489 // Write OpenFlight file front matter: header, vertex palette, etc. 490 490 writeHeader( node.getName() ); 491 491 OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/PaletteRecords.cpp
r8462 r8563 49 49 uint32 paletteSize = in.readUInt32(); 50 50 51 // Ent eries in vertex pool found by offset from start of this record.51 // Entries in vertex pool found by offset from start of this record. 52 52 const int RECORD_HEADER_SIZE = 4; 53 53 const int OFFSET = RECORD_HEADER_SIZE+sizeof(paletteSize); OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/Pools.h
r8003 r8563 309 309 310 310 // This object records parent palettes for external record support. 311 // When an external record is parsed, this object is insta tiated and populated with311 // When an external record is parsed, this object is instantiated and populated with 312 312 // the parent model's palettes, then stored as UserData on the ProxyNode. 313 313 // When the ReadExternalsVisitor hits the ProxyNode, it moves this object OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/PrimaryRecords.cpp
r8385 r8563 314 314 { 315 315 float64 min; // Minimum value with respect to the local coord system 316 float64 max; // Maximum value with respect to the local coord system316 float64 max; // Maximum value with respect to the local coord system 317 317 float64 current; // Current value with respect to the local coord system 318 318 float64 increment; // Increment OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/RecordInputStream.cpp
r8003 r8563 60 60 if (prototype) 61 61 { 62 #if 0 // for debug ing62 #if 0 // for debugging 63 63 { 64 64 for (int i=0; i<document.level(); i++) OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/VertexPaletteManager.cpp
r8086 r8563 178 178 if (t) 179 179 { 180 // Texture coordin stes180 // Texture coordinates 181 181 if (n) 182 182 return VERTEX_CNT; … … 186 186 else 187 187 { 188 // No textu e coordinates188 // No texture coordinates 189 189 if (n) 190 190 return VERTEX_CN; … … 355 355 default: 356 356 { 357 osg::notify( osg::WARN ) << "fltexp: Unsupported array type in conv ersion to Vec2Array: " << arrayType << std::endl;357 osg::notify( osg::WARN ) << "fltexp: Unsupported array type in conversion to Vec2Array: " << arrayType << std::endl; 358 358 return NULL; 359 359 } OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/VertexRecords.cpp
r7748 r8563 215 215 216 216 217 /** Absolut Vertex -217 /** Absolute Vertex - 218 218 * version < 13 219 219 */ OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/expAncillaryRecords.cpp
r8003 r8563 26 26 27 27 28 /** If the DataOutputStream para qmeter is NULL, write to the _records28 /** If the DataOutputStream parameter is NULL, write to the _records 29 29 member variable. Otherwise, write to the specified DataOutputStream. 30 30 */ … … 60 60 } 61 61 62 /** If the DataOutputStream para qmeter is NULL, write to the _records62 /** If the DataOutputStream parameter is NULL, write to the _records 63 63 member variable. Otherwise, write to the specified DataOutputStream. 64 64 */ OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/expGeometryRecords.cpp
r8301 r8563 495 495 unsigned int idx; 496 496 for( idx=0; idx<count; idx++) 497 // I'm imaginin ing that 'first' will be a 0-based index into the497 // I'm imagining that 'first' will be a 0-based index into the 498 498 // 'current' set of vertices held by the vertex palette manager. 499 499 _records->writeInt32( _vertexPalette->byteOffset( first+idx ) ); … … 510 510 unsigned int idx; 511 511 for( idx=0; idx<count; idx++) 512 // I'm imaginin ing that 'first' will be a 0-based index into the512 // I'm imagining that 'first' will be a 0-based index into the 513 513 // 'current' set of vertices held by the vertex palette manager. 514 514 _records->writeInt32( _vertexPalette->byteOffset( indices[ idx ] ) ); OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/expPrimaryRecords.cpp
r8086 r8563 662 662 663 663 // In OSG, each LightPoint within a LightPointNode can have different appearance 664 // parameters, but in OpenFlight, a Light Point Record contains a list of homogen ous664 // parameters, but in OpenFlight, a Light Point Record contains a list of homogeneous 665 665 // vertices. To be correct, we'd have to look at all LightPoints in the LightPointNode 666 666 // and spew out multiple FLT records for each group that shared common appearance … … 681 681 } 682 682 683 // Note that true bidirectional light points are currently unsupported (they are inavailable683 // Note that true bidirectional light points are currently unsupported (they are unavailable 684 684 // in OSG, so we never write them out to FLT as BIDIRECTIONAL. 685 685 int32 directionality( OMNIDIRECTIONAL ); … … 735 735 _records->writeFloat32( 0.f ); // Directional ambient intensity 736 736 _records->writeFloat32( animPeriod ); // Animation period in seconds 737 _records->writeFloat32( animPhaseDelay ); // Animation phase delay in sec nds737 _records->writeFloat32( animPhaseDelay ); // Animation phase delay in seconds 738 738 _records->writeFloat32( animEnabled ); // Animation enabled period in seconds 739 739 _records->writeFloat32( 1.f ); // Significance
