Hi all,
I have some problems adjusting the view of my
scenegraph.
There are 3 images on this website:
The circled slanted line on the first image is a
result of 90 degrees pitching, and it should only show when the image is rotated
(as shown in the rotated view) .
How do I adjust the view such that the slanted does
not show before any rotation is done. The correct view is as shown in the 2nd
image.
I am still a beginner in J3D, so I'm not quite sure
what attributes I have to adjust.
I tried setting the projection, translating, and
using lookAt() & invert() but none of it works.
Please help me.
Here's what I've done:
universe = new
SimpleUniverse(canvas);
universe.getViewingPlatform().setNominalViewingTransform(); TransformGroup vpTG =
universe.getViewingPlatform().getViewPlatformTransform();
universe.addBranchGraph(createSceneGraph(vpTG));
/*
In createSceneGraph(), objects such as the
MouseRotate, MouseTranslate and MouseZoom are created and added to the
BranchGroup (objRoot).
*/
Thanks alot!
Jasmine Kwok
|