"It's such a fundamental aspect of a Scenegraph. From all the example's I've seen in osg, everything is put on the root level. There's no concept of a local coordinate system based on some (root) object."
That's an incorrect assumption, just because a couple of samples just put the data at the root level, does not mean that's all you can do. YOU the programmer in most cases are responsible for how you build your scene graph, you can do flat , you can quad tree you can do an oct-tree or what ever this is down to how you the user creates the scene for your app ( if you search the mail archives this has been discussed ) http://www.vis-sim.com/imgdp/dbpart1.jpg and a couple of old Vega slides to translate to OSG http://www.vis-sim.com/imgdp/vp_graph_ex1.jpg http://www.vis-sim.com/imgdp/vp_graph_tank_01.jpg( the only things you loose control at is how a file loader will create the tree for the model your using. The goal is to have a balanced tree for your usage which may not be the same for another users usages As to translate, rotation, scale of course these are supported, these are handled differently by different scene graphs, in the OSG you have the good of Dof node (Degree of Freedom) DOFTransform, the MatrixTransform, the PositionAttitudeTransform that give you local coordinate systems and the eventually spit out glModelview matrix in the draw process The beauty of the OSG is that it allows you the user a great amount of flexibility but at some point you have to provide the intelligence it needs And don't forget OSG is a dag http://www.vis-sim.com/imgdp/dagb.jpg so a node can hve more than on parent Gordon __________________________________________________________ Gordon Tomlinson Product Manager 3D Email : gtomlinson @ overwatch.textron.com __________________________________________________________ (C): (+1) 571-265-2612 (W): (+1) 703-437-7651 "Self defence is not a function of learning tricks but is a function of how quickly and intensely one can arouse one's instinct for survival" - Master Tambo Tetsura -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of James Moliere Sent: Wednesday, October 01, 2008 12:26 PM To: OpenSceneGraph Users Subject: Re: [osg-users] connected shapes demo... On Wed, 2008-10-01 at 10:57 -0400, Tomlinson, Gordon wrote: > Why should there be an example of this ? > It's such a fundamental aspect of a scenegraph. From all the example's I've seen in osg, everything is put on the root level. There's no concept of a local coordinate system based on some (root) object. Using opengl, I simply push the global coordinate system on the stack, rotate and translate each item and then ultimately pop the stack to get back to my global coordinate system. I was simply interested in how osg and OpenGL compared. > You're the 1st person to this ask for particular exact usage, that I > have seen on this list. > > As to examples of using just transforms there are many and they are > also covered in most of the tutorials online and into the Guide to OSG > written by Paul Martz > I shall hunt these down. > You might want to Google around on scene graphs and > transformations/matrices and how they can be used, to provide local > coordinate systems, how you can chain for certain actions( there are > some things you cannot do by simply using child transforms you have to > do the math in many cases) , there's a lot on the net, also look at > how vis-modeling packages like MultigenCreator, Carbon Grpahics Geo, > Remo3D etc provide tools to create the models and transformation > chains > Thanks for these pointers. I'm trying to see if osg can be used in my project. > > Gordon > > __________________________________________________________ > Gordon Tomlinson > Product Manager 3D > Email : gtomlinson @ overwatch.textron.com > __________________________________________________________ > > "Self defence is not a function of learning tricks but is a function > of how quickly and intensely one can arouse one's instinct for > survival" > - Master Tambo Tetsura > > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of James > Moliere > Sent: Wednesday, October 01, 2008 10:10 AM > To: OpenSceneGraph Users > Subject: Re: [osg-users] connected shapes demo... > > J.P. > Thanks for the advice. I believe I see how to connect objects > together and will hand over a sample if I can get one going. I'm > sorta in disbelief that an example like this doesn't seem to exist. > > James > > J.P. Delport wrote: > > hello, > > > > you can connect transforms together in a parent child fashion, this > > is > > > what a scene "graph" is for. > > > > Try make yourself an example with the following structure: > > > > root > > | > > transform1 -- shape1 > > | > > transform2 -- shape2 > > | > > transform3 -- shape3 > > > > transform1 is child of root > > shape1 and transform2 are children of transform1 ... > > > > jp > > > > > > James Moliere wrote: > >> Gordon, > >> Thanks for letting me know this. > >> > >> Is there a concept of parent/child relationships in OSG with > >> respect to primitive objects? ...To make the cylinder example > >> work? Are all > > >> objects that are placed into the scene work off of global > coordinates? > >> James > >> > >> Gordon Tomlinson wrote: > >>> Nope there's no example that shows this, but many things are > >>> possible with by writing code > >>> > >>> __________________________________________________________ > >>> Gordon Tomlinson > >>> [EMAIL PROTECTED] > >>> IM: [EMAIL PROTECTED] > >>> www.vis-sim.com www.gordontomlinson.com > >>> __________________________________________________________ > >>> > >>> -----Original Message----- > >>> From: [EMAIL PROTECTED] > >>> [mailto:[EMAIL PROTECTED] On Behalf Of > >>> James Moliere > >>> Sent: Tuesday, September 30, 2008 10:36 PM > >>> To: [email protected] > >>> Subject: [osg-users] connected shapes demo... > >>> > >>> Hello, > >>> Is there a connect shapes example? For instance, I'd like to have > >>> 3 > > >>> cylinders where 2 of the cylinders connected sequentially at the > >>> end > > >>> of the previous cylinder. When I rotate cylinder 1, I'd like the > >>> others to rotate about cylinder 1 as though they are connected > >>> without doing any extra calculations. The same goes for cylinder > >>> 2 but this time cylinder 1 stays stationary and cylinder 3 moves. > >>> Is this possible? Is there an example that shows this? > >>> > >>> Thanks! > >>> > >>> _______________________________________________ > >>> osg-users mailing list > >>> [email protected] > >>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegr > >>> ap > >>> h.org > >>> > >>> > >>> _______________________________________________ > >>> osg-users mailing list > >>> [email protected] > >>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegr > >>> ap > >>> h.org > >>> > >>> > >>> > >> > >> _______________________________________________ > >> osg-users mailing list > >> [email protected] > >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegra > >> ph > >> .org > >> > >> > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph. > or > g > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph. > org _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

