Hi Dmitry,
You can share nodes, drawables and state between different subgraphs,
for you aircraft you'll want seperate transform nodes, and this will
naturally require the parents to also be seperate, but the children of
these transforms can all be safely shared.
There is a clone method on all OSG nodes that will enable to you clone
whole subgraphs and select what parts you want to clone or to share.
Have a look at include/osg/CopyOp and include/osg/Node for details.
Alternatively you could built the subgraphs by hand and ensure that
all the appopriate parts are cloned or shared.
Robert.
On 12/14/06, Dmitry Baikov <[EMAIL PROTECTED]> wrote:
Hi!
First of all, thank you for OSG!
We are writing a flight simulator engine and have the following problem:
We need to render several aircrafts of the same type. Aircraft model is
a complex graph with animations, which can be in a different phases
(elerons, gears etc.).
Ideally, the graph should look like this:
Root -> instance1 (pos/rot/anim state) -> model graph
\ |
--- instance2 --------------------------
If my poor ascii skills will not survive emailing - each instance should
have a node holding it's state, and model graph is a child of all
instance nodes(is shared).
So, model graph should be rendered N times with different parameters.
The question is: how instance node can pass it's state to model graph?
Regards,
Dmitry.
P.S. I'm sure many people already had this question. But I couldn't find
an answer.
_______________________________________________
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/