Re: [osg-users] OpenFlight: Reading the Extension Record

2010-09-23 Thread Brad Colbert
Paul,

Thanks so much.  That helps point me in the right direction.  Hopefully
adding the code will be straight forward.

-B
 
 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-
 boun...@lists.openscenegraph.org] On Behalf Of Paul Martz
 Sent: Wednesday, September 22, 2010 1:02 PM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] OpenFlight: Reading the Extension Record
 
 Hi Brad -- The original author of the importer isn't around these
days,
 though
 he does make an occasional rare appearance. I wrote the exporter half
 of the plugin.
 
 Looks like PrimaryRecords.cpp has a class, Extension, for processing
an
 Extension record, but it doesn't appear to parse/save any of the data.
 Looks
 like it just creates a Group node and assigns it the name from the
 extension
 record, then returns. You would probably want to add some code here to
 handle
 the extension record contents the way that you require.
 
 The code you quoted below pertains to handling the PushExtension and
 PopExtension control records, which is only tangentially related to
 Extension
 records themselves.
 -Paul
 
 
 
 Brad Colbert wrote:
  Paul,
 
  Thanks for the quick reply.
 
  I've looked through the source and find a lot of references to
  Extension but doubt that is what it's for.
 
  I was hoping to catch the eye of the author here.
 
  -B
 
  P.S.
 
  One example, I think may or may not be close:
 
  Document.cpp:void Document::pushExtension()
  Document.cpp:OSG_WARN  No current primary in
  Document::pushExtension().  std::endl;
  Document.cpp:void Document::popExtension()
  Document.cpp:OSG_WARN  Can't decide primary in
  Document::popExtension().  std::endl;
  Document.h:// Extension stack
  Document.h:void pushExtension();
  Document.h:void popExtension();
 
 
  -Original Message-
  From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-
  boun...@lists.openscenegraph.org] On Behalf Of Paul Martz
  Sent: Wednesday, September 22, 2010 10:35 AM
  To: OpenSceneGraph Users
  Subject: Re: [osg-users] OpenFlight: Reading the Extension Record
 
  Check the source code. If I recall correctly, the loader reads in
  comment
  records and stores them as UserData in the scene graph, but I'm not
  sure about
  extension records. The only way to know for certain is to check the
  source.
  -Paul
 
 
  Brad Colbert wrote:
  Hello all,
 
  We would like to store some extra meta-data along with (embedded)
 in
  our
  OpenFlight models.  Looking at the OpenFlight spec, there appears
 to
  be
  this thing called an Extension Record that can contain many
  things,
  even XML which is what we are interested in.
 
  To cut-to-the-chase, does the OpenFlight loader in OSG read in any
  way
  these Extension Records or, worse, preclude the reading of the
  record?
  I know this is a pretty open question but I'm just starting to dig
  into
  this.
 
  Any information will be more than I have now, thanks!
 
 ___
 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] OpenFlight: Reading the Extension Record

2010-09-22 Thread Brad Colbert
Hello all,

We would like to store some extra meta-data along with (embedded) in our
OpenFlight models.  Looking at the OpenFlight spec, there appears to be
this thing called an Extension Record that can contain many things,
even XML which is what we are interested in.

To cut-to-the-chase, does the OpenFlight loader in OSG read in any way
these Extension Records or, worse, preclude the reading of the record?

I know this is a pretty open question but I'm just starting to dig into
this.

Any information will be more than I have now, thanks!

-B

---
Brad Colbert
Renaissance Sciences Corporation
W: 480 374-5073 x:5073
F: 425 675-8044

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OpenFlight: Reading the Extension Record

2010-09-22 Thread Paul Martz
Check the source code. If I recall correctly, the loader reads in comment 
records and stores them as UserData in the scene graph, but I'm not sure about 
extension records. The only way to know for certain is to check the source.

   -Paul


Brad Colbert wrote:

Hello all,

We would like to store some extra meta-data along with (embedded) in our
OpenFlight models.  Looking at the OpenFlight spec, there appears to be
this thing called an Extension Record that can contain many things,
even XML which is what we are interested in.

To cut-to-the-chase, does the OpenFlight loader in OSG read in any way
these Extension Records or, worse, preclude the reading of the record?

I know this is a pretty open question but I'm just starting to dig into
this.

Any information will be more than I have now, thanks!


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OpenFlight: Reading the Extension Record

2010-09-22 Thread Brad Colbert
Paul,

Thanks for the quick reply.

I've looked through the source and find a lot of references to
Extension but doubt that is what it's for.

I was hoping to catch the eye of the author here.

-B

P.S.

One example, I think may or may not be close:

Document.cpp:void Document::pushExtension()
Document.cpp:OSG_WARN  No current primary in
Document::pushExtension().  std::endl;
Document.cpp:void Document::popExtension()
Document.cpp:OSG_WARN  Can't decide primary in
Document::popExtension().  std::endl;
Document.h:// Extension stack
Document.h:void pushExtension();
Document.h:void popExtension();


 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-
 boun...@lists.openscenegraph.org] On Behalf Of Paul Martz
 Sent: Wednesday, September 22, 2010 10:35 AM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] OpenFlight: Reading the Extension Record
 
 Check the source code. If I recall correctly, the loader reads in
 comment
 records and stores them as UserData in the scene graph, but I'm not
 sure about
 extension records. The only way to know for certain is to check the
 source.
 -Paul
 
 
 Brad Colbert wrote:
  Hello all,
 
  We would like to store some extra meta-data along with (embedded) in
 our
  OpenFlight models.  Looking at the OpenFlight spec, there appears to
 be
  this thing called an Extension Record that can contain many
things,
  even XML which is what we are interested in.
 
  To cut-to-the-chase, does the OpenFlight loader in OSG read in any
 way
  these Extension Records or, worse, preclude the reading of the
 record?
 
  I know this is a pretty open question but I'm just starting to dig
 into
  this.
 
  Any information will be more than I have now, thanks!
 
 ___
 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: Reading the Extension Record

2010-09-22 Thread Paul Martz
Hi Brad -- The original author of the importer isn't around these days, though 
he does make an occasional rare appearance. I wrote the exporter half of the plugin.


Looks like PrimaryRecords.cpp has a class, Extension, for processing an 
Extension record, but it doesn't appear to parse/save any of the data. Looks 
like it just creates a Group node and assigns it the name from the extension 
record, then returns. You would probably want to add some code here to handle 
the extension record contents the way that you require.


The code you quoted below pertains to handling the PushExtension and 
PopExtension control records, which is only tangentially related to Extension 
records themselves.

   -Paul



Brad Colbert wrote:

Paul,

Thanks for the quick reply.

I've looked through the source and find a lot of references to
Extension but doubt that is what it's for.

I was hoping to catch the eye of the author here.

-B

P.S.

One example, I think may or may not be close:

Document.cpp:void Document::pushExtension()
Document.cpp:OSG_WARN  No current primary in
Document::pushExtension().  std::endl;
Document.cpp:void Document::popExtension()
Document.cpp:OSG_WARN  Can't decide primary in
Document::popExtension().  std::endl;
Document.h:// Extension stack
Document.h:void pushExtension();
Document.h:void popExtension();



-Original Message-
From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-
boun...@lists.openscenegraph.org] On Behalf Of Paul Martz
Sent: Wednesday, September 22, 2010 10:35 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] OpenFlight: Reading the Extension Record

Check the source code. If I recall correctly, the loader reads in
comment
records and stores them as UserData in the scene graph, but I'm not
sure about
extension records. The only way to know for certain is to check the
source.
-Paul


Brad Colbert wrote:

Hello all,

We would like to store some extra meta-data along with (embedded) in

our

OpenFlight models.  Looking at the OpenFlight spec, there appears to

be

this thing called an Extension Record that can contain many

things,

even XML which is what we are interested in.

To cut-to-the-chase, does the OpenFlight loader in OSG read in any

way

these Extension Records or, worse, preclude the reading of the

record?

I know this is a pretty open question but I'm just starting to dig

into

this.

Any information will be more than I have now, thanks!


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org