Hi,
Jo Bard wrote:
Hello everyone,
I work on a project where we can have many instances of the same object.
So I chose to load my models in a branch of the graph (which won't be
drawable) and to put my instances of theses models in another branch, a
drawable one.
why not just use two graphs? The one with the models would have a Node
with a Group core and Nodes with Geometry cores (your models) as children.
The graph with instances would then contain a bunch of nodes with
Transform cores and the leaf Nodes would simply use the Geometry cores
from the other graph.
Strictly speaking you would not even need the graph with the models, but
it is probably the easiest way to keep them alive even if a model is not
referenced by your "instances" graph.
Finally only pass the "instances" graph to the RenderAction to get an image.
If some/all of this sounds strange to you, please check out the docs
Andreas pointed you to.
In fact my instances are just some transformation nodes
which have the model's node as a child. So I would like to render only
the objects of the drawable branch of the graph. How can I do it ?
If you insist on using branches of the same graph, you can check out the
documentation on get/setTravMask methods of the Node class.
I would also like to know if a geometry node is rendered if it has no
"transformation" parent.
The RenderAction draws the graph that lives below the root it is given
and that could be as simple as a Node with a Geometry core or (nearly)
as complicated as you like ;)
Regards,
Carsten
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users