Re: [osg-users] OpenFlight Continuation Record support
Hi Brede -- Tested this morning and Continuation record support works well in current SVN. Thanks for your help with this. -Paul Hi Paul, I have added support for the continuation record to the OpenFlight reader. The implementation now reads the record to memory with one read operation and creates a string stream for parsing. I could replace have-I-reach-the-end-of-record tests with eof() or good() simplifying the code. Update the latest version from SVN with the attached files. Please test if something is broken or the read performance have changed. Regards, Brede On Dec 7, 2007 10:44 AM, Brede Johansen [EMAIL PROTECTED] wrote: Hi Paul, The continuation record is one of the things in the OpenFlight specification that adds a bit of grey to your hair color. I didn't have the need for this record at the time so I left it out together with a lot of other records. That said I did some thinking on how to support it. The current implementation is stream based so it's possible to add a layer that hides the continuation record using a memory buffered stream. The VertexPool already do this by inheriting from std::istringstream. I'll have a look at it. Regards, Brede On Dec 6, 2007 10:56 PM, Paul Martz [EMAIL PROTECTED] wrote: Hi Brede -- I see the current OpenFlight importer doesn't support Continuation Records. I haven't looked at what it would take to add it, but wondered what your thoughts were? Was this left out because it wasn't a requirement, or because it didn't fit into the design? I'm finding I need it for large LocalVertexPool records. I wonder if it could be supported on a record-by-record basis... Thoughts? Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com 303 859 9466 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegrap h.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenFlight Continuation Record support
Thanks Brede, addition now merged and submitted to SVN. On Dec 10, 2007 10:10 PM, Brede Johansen [EMAIL PROTECTED] wrote: Hi Paul, I have added support for the continuation record to the OpenFlight reader. The implementation now reads the record to memory with one read operation and creates a string stream for parsing. I could replace have-I-reach-the-end-of-record tests with eof() or good() simplifying the code. Update the latest version from SVN with the attached files. Please test if something is broken or the read performance have changed. Regards, Brede On Dec 7, 2007 10:44 AM, Brede Johansen [EMAIL PROTECTED] wrote: Hi Paul, The continuation record is one of the things in the OpenFlight specification that adds a bit of grey to your hair color. I didn't have the need for this record at the time so I left it out together with a lot of other records. That said I did some thinking on how to support it. The current implementation is stream based so it's possible to add a layer that hides the continuation record using a memory buffered stream. The VertexPool already do this by inheriting from std::istringstream. I'll have a look at it. Regards, Brede On Dec 6, 2007 10:56 PM, Paul Martz [EMAIL PROTECTED] wrote: Hi Brede -- I see the current OpenFlight importer doesn't support Continuation Records. I haven't looked at what it would take to add it, but wondered what your thoughts were? Was this left out because it wasn't a requirement, or because it didn't fit into the design? I'm finding I need it for large LocalVertexPool records. I wonder if it could be supported on a record-by-record basis... Thoughts? Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com 303 859 9466 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenFlight Continuation Record support
Hi Robert, addition now merged and submitted to SVN. What better way to get it tested ;-) Brede On Dec 11, 2007 5:17 PM, Robert Osfield [EMAIL PROTECTED] wrote: Thanks Brede, addition now merged and submitted to SVN. On Dec 10, 2007 10:10 PM, Brede Johansen [EMAIL PROTECTED] wrote: Hi Paul, I have added support for the continuation record to the OpenFlight reader. The implementation now reads the record to memory with one read operation and creates a string stream for parsing. I could replace have-I-reach-the-end-of-record tests with eof() or good() simplifying the code. Update the latest version from SVN with the attached files. Please test if something is broken or the read performance have changed. Regards, Brede ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenFlight Continuation Record support
Hi Paul, The continuation record is one of the things in the OpenFlight specification that adds a bit of grey to your hair color. I didn't have the need for this record at the time so I left it out together with a lot of other records. That said I did some thinking on how to support it. The current implementation is stream based so it's possible to add a layer that hides the continuation record using a memory buffered stream. The VertexPool already do this by inheriting from std::istringstream. I'll have a look at it. Regards, Brede On Dec 6, 2007 10:56 PM, Paul Martz [EMAIL PROTECTED] wrote: Hi Brede -- I see the current OpenFlight importer doesn't support Continuation Records. I haven't looked at what it would take to add it, but wondered what your thoughts were? Was this left out because it wasn't a requirement, or because it didn't fit into the design? I'm finding I need it for large LocalVertexPool records. I wonder if it could be supported on a record-by-record basis... Thoughts? Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com 303 859 9466 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenFlight Continuation Record support
Continuation records are great when writing out FLT files but a * when reading them back in - I had to abandon upgrading some proprietary FLT reader code because it required a complete rewrite of the FLT file decoder just to support this one new record type. The FLT file record structure requires every record to include a known length not exceeding 1024 bytes, so all the decoder had to do was read the correct number of bytes from the file into a 1024 byte buffer and then start processing the record. The existing FLT record structure was retained with no hint to give advance warning the current record has a following continuation record. The only way I saw to support this record type was to strip out the entire file reading mechanism and craft/hack/jam in a new layer that assembled internal records from one or more FLT file records, and then sent each internal record into the decoder core. Unfortunately this broke the entire design which was based on a long winded while( !eof() ) { readrecord(); processrecord() } architecture. PhilT -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Paul Martz Sent: 06 December 2007 21:56 To: 'OpenSceneGraph Users' Subject: [osg-users] OpenFlight Continuation Record support Hi Brede -- I see the current OpenFlight importer doesn't support Continuation Records. I haven't looked at what it would take to add it, but wondered what your thoughts were? Was this left out because it wasn't a requirement, or because it didn't fit into the design? I'm finding I need it for large LocalVertexPool records. I wonder if it could be supported on a record-by-record basis... Thoughts? Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com 303 859 9466 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org