Hi all,
I have a major problem with picking. I only can pick an object when i'm
inside it. So, i zoom in until i'm in the object. I only set the
transformationgroup of the object to setpickable(true).
This is what i do :
tg_scale = new TransformGroup();
tg_scale.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
tg_scale.setCapability(TransformGroup.ALLOW_PICKABLE_WRITE);
tg_scale.setCapability(TransformGroup.ALLOW_CHILDREN_READ);
tg_scale.setCapability(TransformGroup.ENABLE_PICK_REPORTING);
tg_scale.setCapability(TransformGroup.ALLOW_BOUNDS_READ);
tg_scale.setPickable(true);
---------------------------------------------------------------------------
pc = new PickCanvas(canvas3D, topBranchGroup);
pc.setMode(PickTool.BOUNDS);
pc.setTolerance(4.0f);
pc.setShapeRay(new Point3d(0.0,0.0,0.0), new Vector3d(0.0,0.0,1.0));
pickResult = pc.pickClosest();
if (pickResult != null) {
System.out.println(pickResult.toString());
}
----------------------------------------------------------------------------
-----------------
As output I get :
PickResult: sgp:javax.media.j3d.Locale@45884c58 :
javax.media.j3d.BranchGroup : javax.media.j3d.Switch :
javax.media.j3d.TransformGroup : javax.media.j3d.BranchGroup :
com.fullsail.j3d.loaders.flt.FLTgroup :
com.fullsail.j3d.loaders.flt.FLTobject : javax.media.j3d.Shape3D :
javax.media.j3d.Shape3Djavax.media.j3d.TriangleStripArray@c15c4c47
LocalToVworld Transform:
1.0, 0.0, 0.0, 0.0
0.0, 1.0, 0.0, 0.0
0.0, 0.0, 1.0, -50.0
0.0, 0.0, 0.0, 1.0
node:javax.media.j3d.Shape3D@c0c84c47
PickIntersection: geomIndex = 0
dist:20.899088449057597
ptVW:(2.1911643854910476, -2.4527959539078887, -44.55199126915421)
----------------------------------------------------------------------------
------------------------------
Can anyone see, what i'm doing wrong?
greetings, Bart
===========================================================================
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".