Hi,
I am working on the visualization of a math model and basically need to
view the 3D model from the different viewpoints and view it using a
perspective projection. The model's surface is textured by an image. Now,
to view the model from different points, i am following these steps;
0) The projection policy is set to Perspective using
myView.setProjectionPolicy(myView.PERSPECTIVE_PROJECTION)
1) enable the capability using myView.setCompatibilityModeEnable(true)
2) using perspective(), on the transform3d object like
t.perspective(Math.PI/2, 1.0f, 0.1f, 10.0f);
I need to change my fov var to pi/2, which is what I am doing in the first
parameter.
3) Then set the left projection using myView.setLeftProjection(t)
4) Then use the lookAt() function on the transform3D
object
tl.lookAt(new Point3d(0,0,0), new Point3d(0,-1,0), new Vector3d(0,0,1));
5) Using setVpcToEc
myView.setVpcToEc(tl);
6) set the transform using setTransform()
I also have mouse interaction and hence, can move around the model in
3-space. The textured image has hyperbolic curves, which are supposed to
look circular on looking at it from different viewpoints. But, for some
reason the texturing seems to maintain itself. I am guessing its because
of the lookAt() function, and I think its projecting parallely, even if
the perspective projection is required.
Please let me know if i am doing this right. Is there any other way of
doing this?
Thanks a lot,
Alark Joshi
===========================================================================
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".