Hello Gerrit,
"Gerrit Voß" <vo...@vossg.org> schrieb im
Newsbeitrag news:1266110177.2241.68.ca...@sheldon...
>
> looks good, I probably would have implemented it slightly different
> by making the material stored as a child pointer and keep the inherited
> chunkoverridegroup up-to-date in changed. But this might require changes
> in the material so I have to check if it works without changing OpenSG.
>
I'm not familiar with this, sorry...
>
> Two small other comments, you do not take the slots information into
> account so if the chunks are not using the default slots you will
> get the wrong result, e.g. if a texture chunk is setup for slot 4
> without the preceding 3 in the material it will end up in slot 0 during
> the override.
>
Yes, I overlooked this point. I have uploaded a new version (Base1.zip) to
http://drop.io/OpenSG_RenderEngine .
Is this one corretly implemented? I was a little unsure about the best
access method to the chunk and slot fields.
>
> The on leave subChunk loop might be easier implemented by just calling
> clearChunks(). It depends a little on if you want to allow the usage of
> the inherited addChunk from the outside or if all chunks are expected
> to come through the material.
>
Yes, but the 'clearChunks' function of the ChunkBlock class is protected and
therefore not accessible from the MaterialChunkOverrideGroup. I would
prefere if the outside could not directly add/remove chunks for overriding
as this would (imho) bluring the responsibility of the
MaterialChunkOverrideGroup class. Hence I have protectely overriden the
corresponding interface for the chunk details (as protected inheritance does
not work in this case).
If this class is going to perform its duty, might it then be a valid
contribution to the main
OpenSG code pool? Any attitude?
Best,
Johannes
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users