Tria,
I'm going from memory here, but if I recall, in order to use "USE_GEOMETRY" in
pickAllSorted, you need to first iterate throughout all your (Shape3D) nodes
in your scene (or the subgraph under PickObject) and set the capability
Geometry.ALLOW_INTERSECT.  Thus for every node that you know to be a Shape3D
do something like:
((Shape3D)myNode).getGeometry().setCapability(Geometry.ALLOW_INTERSECT);

Alternatively, you can use PickObject.USE_BOUNDS instead and not worry about
this.  It provides coarser control but should not matter if your end goal is
to get the specific Point3d on an object via PickRay--and you have a sparsely
populated universe..

Hope this helps.
-guillermo
[EMAIL PROTECTED]


Tria wrote:

> Hi..
>
> Supposed that I have a class extended from Shape3D. I want to retrieve
> objects from that class by using PickObject class.
> If I use PickObject.pickAllSorted(x,y, PickObject.USE_GEOMETRY), I got
> message "no capability set for allowing intersect". If I don't specify any
> flag, the result is null.
> If I use BranchGroup.pickAllSorted, and then make a conditional " if obj
> instanceof shape3d" and make a casting like this :
> ClassName newclass = (ClassName) obj,
> I got error message "classcastexception"...
>
> Which pick should I use for that?
>
> Thanks
> Tria
>
> ===========================================================================
> 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