Hello Björn,
Björn Zehner wrote:
> Dear all,
> I have two questions (for OpenSG 1.8):
>
> 1.) For all I know a material affects the rendering off all objects that are
> in
> the scenegraph below it. Is there a way to limit this? I want to have e.g. a
> Material/Multipassmaterial with ClipPlaneChunks in the scenegraph that
> affects
> all objects below it, but the color etc shall be taken from the materials
> attached to the geometries. Is this possible at all?
unfortunately this is not possible with 1.x, you can only override
materials as a whole not on a chunk by chunk basis.
So for your ClipPlaneChunk you would have to add it to all geometries,
sorry. It might be helpful to collect the geometries in a second tree
that exists only for the purpose of adding/removing the clip planes, but
that depends on how often you are changing them.
> 2.) How do I (deep) copy an object, e.g. a material? I only found functions
> like
> cloneTree() which work on the whole tree and expect NodePtr's.
there is also some variants of deepClone which do that, they are
declared in Source/System/FieldContainer/Impl/OSGNodeImpl.h and defined
in Source/System/FieldContainer/OSGNode.cpp. The variants differ in how
you can specify what types to share instead of deep copy them.
Hope it helps,
Carsten
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users