This message keep bouncing back. Could you please post it for me
and let me know why I cannot post to the digest. I am a member
of the group and I have been reciveing the digest and indivialul
posting for the last couple of days or so.
Note I have sending the post to the E-mail: [EMAIL PROTECTED]
Thanks for the help,
- Abed
>
> Hello,
>
> I have used the ObjLoad class (application) distributed with
> java3d 1.1 to display a surface. What I would like to do is to
> allow the user to click on the surface and have the coordinates
> of the nearest vertex be printend out to stdio. So I tried
> the following code:
>
> class SurfaceMouseListener extends MouseAdapter {
>
> public void mouseClicked(MouseEvent evt) {
>
> System.out.println("Mouse Clicked: " + evt);
>
> Point3d p = new Point3d();
> Transform3D xform = new Transform3D();
>
> c.getPixelLocationInImagePlate(evt.getX(), evt.getY(), p);
> System.out.println("The (x, y) mouse coordinates: " + p);
>
> c.getImagePlateToVworld(xform);
> System.out.println(xform);
>
> xform.transform(p);
> System.out.println("The point3d is: " + p);
>
> }
>
> }
>
> and I used the above class to listen to the mouse. Keeping in mind
> that the surface is made of vertices (that are point3D) of the form:
>
> v 125.759003 147.942993 87.498398
> v 29.879999 141.669998 87.336304
> v 77.745796 219.962006 80.463097
> v 82.861603 59.720299 95.204803
> v 81.098099 142.345993 141.294998
> v 78.962502 142.395996 43.585400
>
> So from the above code I expect the value printed for "P"
> to be one of the surface vertices. I also expect the value
> of "p" to change as I rotate/translate the surface. This is
> not the case though and I am wondering what I am doing wrong.
>
> Please let me know if the above code is suppose to do what
> I am wanting to do. If you have a sample code using
> PickRay+PickClosest I would truly appreciate it if you
> could send it to me.
>
> Thanks,
>
> - Abed
>
> --
> Abed M. Hammoud, D.Sc. [EMAIL PROTECTED]
> IntellX L.L.C. Office: (303) 469-7383
> Colorado, USA http://www.anatomic.com/abed
--
Abed M. Hammoud, D.Sc. [EMAIL PROTECTED]
IntellX L.L.C. Office: (303) 469-7383
Colorado, USA http://www.anatomic.com/abed
Your message could not be delivered for one of the following reasons:
1. You are trying to send a list server request (such as a subscription
request) to the wrong address.
For information on how to subscribe or unsubscribe, send mail to
[EMAIL PROTECTED]
with the message body containing the word "help".
NOTE: Please do not send subscribe/unsubscribe requests to the mailing
list. These requests should be sent to [EMAIL PROTECTED]
2. You are posting to a list which only allows subscribers to post.
* If you are not subscribed, please do so and then repost the message.
* If you are subscribed, then you are possibly subscribed under a
different email address. Resubscribe using your new address and then
repost your message.
NOTE: If you do not wish to subscribe/resubscribe but still wish to post
your message, put the word "approve" in the FIRST line of your
message, with no blank lines or spaces before it.
3. There was a word in the message that was considered by the list server as
a possible list server request (see 1 above).
If you have any questions, send mail to
[EMAIL PROTECTED]
-----------------------------------------------
>From [EMAIL PROTECTED] Mon Dec 21 13:35:14 1998
Return-Path: <[EMAIL PROTECTED]>
Received: from Eng.Sun.COM by capra.eng.sun.com (SMI-8.6/SMI-SVR4)
id NAA25708; Mon, 21 Dec 1998 13:35:14 -0800
Received: from sunmail1.Sun.COM (sunmail1 [129.145.1.2])
by Eng.Sun.COM (SMI-8.6/SMI-5.3) with SMTP id NAA16512
for <[EMAIL PROTECTED]>; Mon, 21 Dec 1998 13:35:14 -0800
Received: from earth.sun.com by sunmail1.Sun.COM (SMI-8.6/SMI-4.1)
id NAA20506 for <[EMAIL PROTECTED]>; Mon, 21 Dec 1998 13:35:14 -0800
Received: from rumi.anatomic.com (rumi.anatomic.com [209.38.8.21])
by earth.sun.com (8.9.1/8.9.1) with ESMTP id NAA27814
for <[EMAIL PROTECTED]>; Mon, 21 Dec 1998 13:35:13 -0800 (PST)
Received: from anatomic.com (localhost [127.0.0.1]) by rumi.anatomic.com
(980427.SGI.8.8.8/970903.SGI.AUTOCF) via ESMTP id OAA02357 for
<[EMAIL PROTECTED]>; Mon, 21 Dec 1998 14:35:11 -0700 (MST)
Sender: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
Date: Mon, 21 Dec 1998 14:35:11 -0700
From: "Abed M. Hammoud" <[EMAIL PROTECTED]>
Organization: IntellX, L.L.C
X-Mailer: Mozilla 4.5 [en] (X11; U; IRIX 6.5 IP32)
X-Accept-Language: en
MIME-Version: 1.0
To: java3d <[EMAIL PROTECTED]>
Subject: Help with surface picking please.
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
content-length: 1781
Hello,
I have used the ObjLoad class (application) distributed with
java3d 1.1 to display a surface. What I would like to do is to
allow the user to click on the surface and have the coordinates
of the nearest vertex be printend out to stdio. So I tried
the following code:
class SurfaceMouseListener extends MouseAdapter {
public void mouseClicked(MouseEvent evt) {
System.out.println("Mouse Clicked: " + evt);
Point3d p = new Point3d();
Transform3D xform = new Transform3D();
c.getPixelLocationInImagePlate(evt.getX(), evt.getY(), p);
System.out.println("The (x, y) mouse coordinates: " + p);
c.getImagePlateToVworld(xform);
System.out.println(xform);
xform.transform(p);
System.out.println("The point3d is: " + p);
}
}
and I used the above class to listen to the mouse. Keeping in mind
that the surface is made of vertices (that are point3D) of the form:
v 125.759003 147.942993 87.498398
v 29.879999 141.669998 87.336304
v 77.745796 219.962006 80.463097
v 82.861603 59.720299 95.204803
v 81.098099 142.345993 141.294998
v 78.962502 142.395996 43.585400
So from the above code I expect the value printed for "P"
to be one of the surface vertices. I also expect the value
of "p" to change as I rotate/translate the surface. This is
not the case though and I am wondering what I am doing wrong.
Please let me know if the above code is suppose to do what
I am wanting to do. If you have a sample code using
PickRay+PickClosest I would truly appreciate it if you
could send it to me.
Thanks,
- Abed
--
Abed M. Hammoud, D.Sc. [EMAIL PROTECTED]
IntellX L.L.C. Office: (303) 469-7383
Colorado, USA http://www.anatomic.com/abed