Sure thing!

On 6/13/07, Jeremy L. Moles <[EMAIL PROTECTED]> wrote:

On Wed, 2007-06-13 at 15:22 -0500, Catherine Peloquin wrote:
> Thanks.
>
> "This might be a fun kind of NodeVisitor to write..."
> I'll find out soon enough. ;)

:)

Well, I'm still a bit of an OSG newb myself, but it might easier to work
backward, as it were, since--if your SceneGraphs look like mine--you
won't want to write a Transform without also include the thing it
transforms.

If you get it working, I'd be really interested in seeing it. :)

> Catherine
>
>
>
> On 6/13/07, Jeremy L. Moles <[EMAIL PROTECTED]> wrote:
>         On Wed, 2007-06-13 at 20:59 +0100, Robert Osfield wrote:
>         > Hi Catherine,
>         >
>         > The osgDB::writeNodeFile(Node*, std::string) method can work
>         on any
>         > node in the scene graph so to write out a child:
>         >
>         >   osgDB::write(parent->getChild(childNum),
>         "mychildfile.osg");
>
>         This might be a fun kind of NodeVisitor to write... something
>         that
>         traversed the scene and built a directory structure based on
>         graph's
>         hierarchy and wrote each encountered drawable to a file, along
>         with it's
>         parental information back up the last known drawable.
>
>         Just thinking out loud, though...
>
>         > On 6/13/07, Catherine Peloquin < [EMAIL PROTECTED]>
>         wrote:
>         > > Hello all,
>         > >
>         > > I have just started working with OpenSceneGraph, so I
>         apologize if this
>         > > question is simple.  I am working on an OSG/GTK project
>         that imports
>         > > stock.osg files into a viewer where they can be
>         manipulated.  The imported
>         > > objects are arranged in a tree structure beneath a main
>         node node.
>         > >
>         > > I need to save each of the imported and manipulated
>         objects in the
>         > > scenegraph into separate .osg files.
>         > >
>         > > My original idea was to get the main node, find out how
>         many children
>         > > (imported objects) it had, and iterate for each child to
>         getChild() and then
>         > > somehow saving that child.  The problems I encountered
>         were that I could not
>         > > figure out how to choose the main node without having the
>         user select it,
>         > > and then found that getNumChildren() and getChild() were
>         group, not node
>         > > functions.  I also am not sure what the function is to
>         save a child as a
>         > > .osg file.
>         > >
>         > > Does anyone have any ideas as to how I could save the
>         children separately?
>         > >
>         > > Just to note, I am working on a Windows XP machine.
>         > >
>         > > Thank you,
>         > > Catherine Peloquin
>         > >
>         > >
>         > > _______________________________________________
>         > > osg-users mailing list
>         > > [email protected]
>         > > http://openscenegraph.net/mailman/listinfo/osg-users
>         > > http://www.openscenegraph.org/
>         > >
>         > _______________________________________________
>         > osg-users mailing list
>         > [email protected]
>         > http://openscenegraph.net/mailman/listinfo/osg-users
>         > http://www.openscenegraph.org/
>         >
>
>         _______________________________________________
>         osg-users mailing list
>         [email protected]
>         http://openscenegraph.net/mailman/listinfo/osg-users
>         http://www.openscenegraph.org/
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to