Hello Johannes,
Johannes Brunen wrote:
> Hi,
>
> Marcus Lindblom wrote:
>> You could perhaps add a convenience function allowing one to select a
>> subset of the first 32 (or 64) nodes using bit values, which
> internally
>> still uses the mfchoices approach?
> Done.
>
>> Doesn't Node have an getIndexOfChild() or something similar?
> Didn't know that. But is it an O(1) operation?
no, it's a linear search.
>> Have you considered sorting the mfchoices field in the changed()
> method?
> No, I didn't considered that, but it is a very good idea.
>
>> Could perhaps be implemented as the first index of the choices field
>> being -1 or -2?
> This is probably not such a good idea. Instead, I have choosen to add a
> switchMode field for that.
>
> Finally, I have build a new core node named OSGMultiSwitch replacing
> OSGSelect.
>
> Carsten I send it to you privately as a zip file. Oh, I have to mention
> that I also added an new erase function taking two iterators to the
> OSGMField class. This is also contained in the packed file. I have
> tested the the new core node on my windows (7.1) box and it is working
> properly.
many thanks for sending the code, very nice work!
I just committed it to cvs and will add it to 2.0 next.
> As a side note, at first I have tried to name the switchMode field
> simply with the name 'Mode'. I was unable to use this name. It always
> resulted to an unresolved external symbol for the function setMode.
> After renaming the field everything went perfectly fine.
you had declared a setMode member function on OSGMultiSwitch.h that was
not defined, I removed it, but kept _sfSwitchMode's name.
Thanks,
Carsten
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users