On a similar note:
What would be the best method of picking using node's that aren't
visible?
For example, I have:
BG
|
|----> Switch
|
|---->Shape3D(A)
|
|---->Shape3D(B)
If A is visible but I want to Pick using B's geometry, would it be
sufficient to set the Switch mode to use B and then set it back,
or will I see flickering between A & B?
-DaveS
----- Original Message -----
From: "Yann Lemoigne" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 07, 2003 9:34 AM
Subject: Re: [JAVA3D] need help java3d code
You can't use picktool on live or compiled object.
2 solutions :
1 - Do PickTool.setCapabilities(xxx) after object creation but before adding
it to your scene (and use setPickable() method to change pickability at
runtime)
2 - Or Detach the BranchGroup of your object, do the
PickTool.setCapabilities(xxx) on your object, and re-attach the branchgroup
(but this branch musn't be compiled)
-----Message d'origine-----
De : Brobbey,Isaac (neuron) [mailto:[EMAIL PROTECTED]]
Envoy� : mardi 7 janvier 2003 15:05
� : [EMAIL PROTECTED]
Objet : [JAVA3D] need help java3d code
i am getting an error when i try to make two or more displays by
repeatedly calling this method below:
void enumKids(Group tg)
{
java.util.Enumeration enumKids = tg.getAllChildren();
while (enumKids.hasMoreElements())
{
System.out.println("More elements to check");
SceneGraphObject sg = (SceneGraphObject)
enumKids.nextElement();
if (sg instanceof Shape3D || sg instanceof Morph)
{
PickTool.setCapabilities((Node) sg, PickTool.INTERSECT_FULL);
sg.setCapability(PickTool.INTERSECT_FULL);
System.out.println("Capability = " +
sg.getCapability(PickTool.INTERSECT_FULL));
}
}
}
i am getting the following error
Size of vector is 312
Exception in thread "main" javax.media.j3d.RestrictedAccessException:
Cannot modify capability bits on a live or compiled object
at javax.media.j3d.SceneGraphObject.setCapability(SceneGraphObject.java:
101)
at
com.sun.j3d.utils.picking.PickTool.setCapabilities(PickTool.java:283)
at
com.sun.j3d.utils.picking.PickTool.setCapabilities(PickTool.java:270)
at Graphic.enumKids(Graphic.java:301)
at Graphic.createConeTransformGroup(Graphic.java:277)
at Graphic.createSceneGraph(Graphic.java:532)
at Graphic.<init>(Graphic.java:684)
at Tabed.<init>(Graphic.java:1393)
at Graphic.main(Graphic.java:85)
Is there any work around on the PickTool ? how can I modify the PickTool
to make it work for two or more displays ? i am running out of Ideas , i
will appreciate any help.
thanks,
isaac
===========================================================================
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".
===========================================================================
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".