Dear Java3d users

I have a Canvas3d object which has a pixel x and pixel y position (say a
mouse click) for which I'm interested
in finding my data value.

To explain, I've put into my 3d model only PointArray objects whose
coordinate values are between -2000.0 and
2000.0 on any of the three axis.  The actual data isn't important, what
is important is that I have data whose x coordinates can range from
-2000.0 to 2000.0.  As well as the Y and the Z data.

Assume that at least some of my data, but not all, shows up in the view
(good field of view, translation, rotation, scale, etc.).

Now all I want to do is supply a (valid for my canvas) pixel X and Y and
get back a Point3d which indicates what value the pixel X and Y are in
my data's coordinate system.  Thus I need to get back something like
233.0, -1387.0, 345.0.

Can somebody get me over this hump in the road.  I need a "complete
solution" that works from beginning to end.

I've tried the following:

  TransformGroup     vp_trans = null;
 ....
  Point3d position = new Point3d ( );
  canvas.getPixelLocationInImagePlate(pixel_x, pixel_y, position);
  Transform3D ctf = new Transform3D();
  vp_trans.getTransform ( ctf );
  canvas.getImagePlateToVworld( ctf );
  ctf.transform(position_b);

but the values of position.x and position.y always are between -1.0 and
1.0, with 0.0 always being at the center of the canvas.  Do I need to
multiply these returned values by something?

Thanks in advance,

Gregory Bradford
begin:vcard
n:Bradford;Gregory
tel;fax:408-736-8447
tel;work:408-736-2822
x-mozilla-html:FALSE
adr:;;;;;;
version:2.1
email;internet:[EMAIL PROTECTED]
fn:Gregory Bradford
end:vcard

Reply via email to