Thank you Matthew for your answer.
Now the questions are:
1) How can I get the direction of the versor of the two edges?
2) How can I be sure that the two direction I've found are tangential to
the
face.
( Some object are obtained using segment (QuadArray or TriangleArray)
wich
have some edges that lies inside of it. Picking the closest vertex
with this object is also a problem)
Thank you
Matthew Pocock ha scritto:
> Hi.
>
> Given two vectors that lie along the surface of the clicked object, the
> perpendicular will be their cross product. I guess that you would have to
> find out the nearest vertex to the mouse click and then get two of the
> edges from that vertex, cross product them and use that as the direction
> for your cylinder.
>
> Hope that helps.
>
> Matthew
>
> Paolo Balzarotti wrote:
>
> > Hi,
> > my aim is to insert an object (a line or a cylinder) in the virtual
> > universe by clicking on the surface of another object. The inserting
> > object must be placed perpendicularly to the surface of the picked
> > one. Can you tell me how can I retrive the transform (Transform3D) of
> > the perpendicular (normal) direction.
> > --
> > Saluti, Balza
> >
> > Visita la Martilla's home page a: http://members.tripod.com/~Martilla
> >
> > =====================================================================
> > To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
> > Java 3D Home Page: http://java.sun.com/products/java-media/3D/
--
Saluti, Balza
Visita la Martilla's home page a: http://members.tripod.com/~Martilla
=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/