Hello folks,

I am using parallel projection and using screen scale to simulate zooming. I
need to be able to project a ray into the scene to perform some intersection
algorithms when the user clicks. To do this I am simply moving the mouse
point to the image plate and from the image plate to the vworld, then doing
a cross product of vectors on the image plate to get a ray perpendicular to
the image plate.

All this is working well, except that the z-value of the mouse point in the
virtual world appears way off. My guess is that the mouse point is being
scaled by the screen scale in some way, but I can't find any documentation
on this. Why would a 0 Z value on the image plate cause the point to be
scaled to past the origin in the vworld? Can someone shed some light on it?

View Platform Pos: (0, 0, 1.9113696E7)
Screen Scale: 1.6939778031045968E-8
Eye in image plate:
  (0.15155333333333335, 0.1347611111111111, 0.2957036069575117)
Mouse in image plate:
  (0.12474222222222223, 0.17610666666666666, 0.0)
Eye in vworld:
  (-1.862645149230957E-9, 0.0, 2.5484928E7)
Mouse in vworld:
  (-2333981.1361973807, 3599244.5942412186, -256886.19353172183)
Imageplate to Vworld:
  8.705275684117863E7, 0.0, 0.0, -1.319313547513676E7
  0.0, 8.705275684117863E7, 0.0, -1.173132623720261E7
  0.0, 0.0, 8.705275684117863E7, -256886.19353172183
  0.0, 0.0, 0.0, 1.0

Is there a simple way to get coplanar with the image plate to be on the view
platform?

Thanks,
-mike

===========================================================================
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".

Reply via email to