Hi Ed,
A Shape3D is a Node (look at the hierarchy).  Thus, assuming that your 
"getSceneGroup()" method
returns a Group or BranchGroup (we'll call "myGroup") you can iterate through it's 
children via:
myGroup.numChildren() and myGroup.getChild(int) or myGroup.getAllChildren().  Then on 
each child
(which will be a Node), you can call:
((Shape3D)myNode).getGeometry().setCapability(Geometry.ALLOW_INTERSECT);

Thus the whole thing might look something like:
for (int i; i < ((Group)myscene.getSceneGroup()).numChildren(); ++i)
((Shape3D)((Group)myscene.getSceneGroup()).getChild(i)).getGeometry().setCapability(Geometry.ALLOW_INTERSECT);

Two last things:
1) The above code is highly cryptic (and inefficient!)...it's always good to use more 
variables for
readability and code efficiency.
2) You'll have to set additional ALLOW_CHILDREN_READ and ALLOW_GEOMETRY_READ 
capabilities to get
this to work.

Hope this helps,
-guillermo
[EMAIL PROTECTED]

Edward Scholl wrote:

> Hello,
>
> Could use some help here...
> I'm loading an obj scene, and setting the intersect capability with:
>          myscene.getSceneGroup().setCapability(Geometry.ALLOW_INTERSECT)
> which I know isn't quite right because I need to set ALLOW_INTERSECT on my
> Shape3D geometry, hence my error:
>          javax.media.j3d.CapabilityNotSetException: Shape3D: no capability to allow 
>intersect
>
> So, how the heck do I set the capability on the geometry?  I can get the node, but 
>from there...
> Thanks in advance.
>
> -Ed
>
> ===========================================================================
> 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".
begin:vcard
n:Gutierrez;Guillermo
tel;fax:407-984-6323
tel;work:407-984-6543
x-mozilla-html:TRUE
org:Harris Corporation;GCSD
adr:;;;;;;
version:2.1
email;internet:[EMAIL PROTECTED]
title:Software Engineer
x-mozilla-cpt:;-19648
fn:Guillermo Gutierrez
end:vcard

Reply via email to