Xith core changes

Could someone please add these lines to the xith core?

com.xith3d.scenegraph.Node


    private static boolean defaultPickable = false;
    private boolean pickable = defaultPickable;
    
    /**
     * Is a Node object pickable when created?
     */
    public static boolean getDefaultPickable()
    {
        return(defaultPickable);
    }
    
    /**
     * Each Node object will be pickable by default following this static flag
     * 
     * @param b pickable by default?
     */
    public static void setDefaultPickable(boolean b)
    {
        defaultPickable = b;
    }

With these changes we could use the setPickable flag with the PickingLibrary.

I’ve inserted it into the Node class. Here it is…
But it still needs to be commited to CVS.

Ah I understand the use of that BUT I use a simple recursive function to set if my nodes are pickable or not where’s the problem with that ?
We could just do a setAllChildrenPickable() method ? (Scenegraph traversal methods are to be added : there are SOOO useful).

[quote="<MagicSpark.org [ BlueSky ]>,post:3,topic:27677"]
Ah I understand the use of that BUT I use a simple recursive function to set if my nodes are pickable or not where’s the problem with that ?
[/quote]
I think the conventional way of picking is somewhat deprecated and should be removed from the xith package in the near future. But the setPickable flag IS useful and needs to remain in the package and is to be used in the PickingLibrary (easy to implement). But since the conventional picking is still part of the Xith package and is certainly being used by several people (with the setPickable flag) and the default value is sensefully and we need it to be , this is a useful and high-performance interim solution until to old picking system is removed. And if it is never removed, it is just as useful to have this addition permanently, too.

[quote="<MagicSpark.org [ BlueSky ]>,post:3,topic:27677"]
(Scenegraph traversal methods are to be added : there are SOOO useful).
[/quote]
I’ve coded an abstract solution for scenegraph traversal operations. Watch the package org.xith3d.scenegraph.traversal on CVS. I hope, this is what you beared in your mind.

Qudus

I think the conventional way of picking is somewhat deprecated and should be removed from the xith package in the near future. But the setPickable flag IS useful and needs to remain in the package and is to be used in the PickingLibrary (easy to implement). But since the conventional picking is still part of the Xith package and is certainly being used by several people (with the setPickable flag) and the default value is sensefully and we need it to be , this is a useful and high-performance interim solution until to old picking system is removed. And if it is never removed, it is just as useful to have this addition permanently, too.
[/quote]
OK then. But the old picking method isn’t to be removed : it may be useful for other uses… and doesn’t hurt while it’s here.

I’ve coded an abstract solution for scenegraph traversal operations. Watch the package org.xith3d.scenegraph.traversal on CVS. I hope, this is what you beared in your mind.
[/quote]
That seems fine. We could implement some listeners to set e.g. transparency, pickable properties, or things like that.

It’s done.

[quote="<MagicSpark.org [ BlueSky ]>,post:6,topic:27677"]
It’s done.
[/quote]
Thanks.