Hi Jack,

I used the following piece of code, which is working fine for me:

                Layer3D l3d = getSelectedLayer3D();
                Enumeration enum2 = l3d.getAllChildren();
                Object o2;
                while(enum2.hasMoreElements()) {
                    o2 = enum2.nextElement();
                    if (o2 instanceof BranchGroup) {
                        BranchGroup pickbg = (BranchGroup) o2;
                        Enumeration enum3 = pickbg.getAllChildren();
                        Object o3;
                        while(enum3.hasMoreElements()) {
                            o3 = enum3.nextElement();
                            if (o3 instanceof PickObjectBehavior) {
                                hasPick = true;
                            }
                        }
                    }
                }

I hope it answers your question.

Desiree





o------------------------------------------------------------------------o
| Desiree Hilbring      Institut fuer Photogrammetrie und Fernerkundung  |
|                       Universitaet Karlsruhe, Germany                  |
|                                                                        |
|                       email: [EMAIL PROTECTED]             |
|                       # 0721 6083676                                   |
o------------------------------------------------------------------------o

On Thu, 1 Jun 2000, Jack Gundrum wrote:

> Does anyone know if when you use getAllChildren wether that is all
> the children of the branchgroup only but not the childrens children and so
> one?
>
> example:
>
>                        BranchGroup bg = new BranchGroup();
>                 bg.setCapability(BranchGroup.ALLOW_CHILDREN_READ);
>                 bg = s.getSceneGroup();
>                 Enumeration enumeration = bg.getAllChildren();
>                 Object tmpObject1 = null;
>                 while (enumeration.hasMoreElements())
>                 {
>                         tmpObject1 = enumeration.nextElement();
>                                    if (tmpObject1 instanceof BranchGroup){
>
>
>                                    }
>                       }
> Jack S. Gundrum
> Visualization Group
> Center for Academic Computing
> Penn State University
> Email:[EMAIL PROTECTED]
> Phone:(814)865-1863
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff JAVA3D-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to