Re: [osg-users] Reuse of models without duplication

2010-04-19 Thread Dave Sawyer
Thanks for the code snippet!! That is really pretty easy. I like the structure (adding the model as a child of the transform). Its a pretty elegant all in all. ... Thank you! Cheers, Dave -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=26967

Re: [osg-users] Reuse of models without duplication

2010-04-16 Thread Trajce (Nick) Nikolov
wops . place the closing bracket after root->addChild :) -Nick On Fri, Apr 16, 2010 at 5:45 PM, Trajce (Nick) Nikolov < nikolov.tra...@gmail.com> wrote: > Hi Dave, > > the former with instancing subgraphs with Transform is really easy. Hope > the following snippet will give you the idea: > > os

Re: [osg-users] Reuse of models without duplication

2010-04-16 Thread Trajce (Nick) Nikolov
Hi Dave, the former with instancing subgraphs with Transform is really easy. Hope the following snippet will give you the idea: osg::Group* root = ... osg::Node* myModel = . for (int i=0; isetMatrix(osg::Matrix::translate(myPosition)); mxt->addChild(myModel); } root->addChild(mxt); Cheers,

Re: [osg-users] Reuse of models without duplication

2010-04-16 Thread Dave Sawyer
Robert, Thank you very much for your reply. I will certainly start with much smaller data sets as I move toward my goal. Further your suggestions for the more advanced topics are much appreciated. Its very helpful to know before delving too deeply into OSG, that it can do what I need. Th

Re: [osg-users] Reuse of models without duplication

2010-04-16 Thread Robert Osfield
Hi Dave, The OSG allows you to share subgraphs between multiple parents - in your case it'd multiple Transform nodes, so yes you can do what you are intending to do. However, you mention that you want to create millions of instances and in this case your approach will be inappropriate as the CPU

[osg-users] Reuse of models without duplication

2010-04-15 Thread Dave Sawyer
Hi, I am extremely new to OSG (as in it built and I got a small application to draw a 2D box). What I am really trying to figure out is if it will suite my needs or not. This is probably an extremely elementary question; but through the tutorials and documentation I have not been unable to