Hello Johannes,
Johannes Brunen wrote:
> "Carsten Neumann" <[email protected]> schrieb im
>>> In OpenSG 1.8 I first used the StateSortingGroup class. After some
>>> experimenting I discovered that the usage of this node is not necessary
>>> at all.
>> hm? why not, i.e. what does ensure the correct ordering?
>>
> I don't know. It just worked.
ok :)
>>> 2. Isn't it a good idea to propose a group node which defines that its
>>> children are always rendered in the order the children list?
>> one could write a variant of the ScalarSortTreeBuilder that increments a
>> counter every time a node is added to the render tree (and reset after
>> the render tree is drawn). Then a form of StateSortingGroup could be
>> brought back in the form of a Stage that sets up a RenderPartition with
>> the new type of tree builder.
>>
> You lost me here... A little bit of background information might be helpful.
yeah, sorry that was more or less just me thinking out loud how it could
be done.
Ok, when the RenderAction traverses the graph it builds up another tree
(draw tree/render tree) that (normally) groups its nodes by materials.
There are a few different types of these render trees that differ by the
sorting criterion and are managed by types derived from TreeBuilderBase
(one is ScalaSortTreeBuilder that just uses a scalar value to sort the
nodes) - so to do what you propose a new type of tree builder would be
needed that automatically assigns and increments a scalar.
Now the final part is that the trees and tree builders are living in
RenderPartition (which is just the backend counterpart to the stages in
the graph). That means you don't have to globally (for the whole scene)
switch the way the render tree is built, but only for one partition
(stage) under which you have your capped clip plane geometry.
Probably the best starting point is to look at
RenderPartition::dropFunctor() which is the place where new nodes are
added to the partitions draw tree.
I hope this is a bit better explanation, if not please do keep asking
questions :)
Cheers,
Carsten
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users