Hi,

I can delete them. You what, the reason is that I forget to set
ALLOW_PICKING_REPORT. The JVM does't report any capability error, so I had
no way to know that I didn't set ALLOW_PICKING_REPORT. After I read the doc,
I found that by accident.


Qiuli

-----Original Message-----
From: Discussion list for Java 3D API
[mailto:[EMAIL PROTECTED]]On Behalf Of Qiuli Sun
Sent: Wednesday, December 13, 2000 3:31 PM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] How do I pick and delete objects? Any example?


Hi,

I have some trouble in picking and removing the object. My structure is
simple -  a TransformGroup node, under which I have many BranchGroup nodes.
I want to pick and delete one BrachGroup node one time. I can not get access
to BrachGroup node, so I can not use removeChild() and detach().

My code is as following:

BranchGroup pickBG =
(BranchGroup) pickResult.getNode (PickResult.BRANCH_GROUP);
Shape3D  shape = (Shape3D) pickResult.getNode (PickResult.SHAPE3D);
if (pickBG != null)
{ pickTG.removeChild (1);
  System.out.println("Brach");
}
if (shape != null) {
     System.out.println("Shape");
}


The problem here is that I alway got a null of 'pickBG'  while 'shape' is
not null.

Why? Any comments?

Any similar example?

Qiuli

===========================================================================
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