Hi Kovalan,

I think what you are looking for is a composite transformation
matrix that gets you from object to viewplatform coordinates.
This is probably what the eye coordinates in OpenGL means, i.e.,
before clipping, perspective division, and transformation to window
space.

You may also want to look at the "ImagePlate" associated methods
in Canvas3D if you want to get the final coordinates on screen.

Off the top of my head, here it goes ( check to see if someone has a
better option ):

// object is Shape3D holding your geometry
// vp is ViewPlatform, a reference to which can be
// obtained from the ViewingPlatform in SimpleUniverse

// get matrix to go from object to ViewWorld
Transform3D obj2vw = new Transform3D();
object.getLocalToVworld( obj2vw );

// get matrix to go from ViewWorld to ViewPlatform
Transform3D vp2vw = new Transform3D();
vp.getLocalToVworld( vp2vw );

// get inverse of above
Transform3D vw2vp = new Transform3D();
vw2vp.invert( vp2vw);

// create composite tranform to go from
// object to viewplatform
// this is probably what you are looking for
Transform3D obj2vp = new Transform3D();
obj2vp.mul( vw2vp, obj2vw );

You can now use obj2vp to transform your vertices.

Regards

Raj Vaidya

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