Hello, everyone

Some time ago I sent a help message about how to using Transform3D frustum. I have got some suggestions. The Transform3D frustum can work using the compability mode and use
myView.setVpcToEc(myTransform) and myView.setLeftProjection(frustrum).

But I find something which seems wrong. The code is like following:

public BranchGroup createSceneGraph(SimpleUniverse su) {
// Create the root of the branch graph
BranchGroup objRoot = new BranchGroup();


// rotate object
Transform3D rotate = new Transform3D();
rotate.rotY(Math.PI/4.0d);
TransformGroup objRotate = new TransformGroup(rotate);

objRoot.addChild(objRotate);
objRotate.addChild(new ColorCube(0.4));

Transform3D translate1 = new Transform3D();
boolean suFlag = true;

// set compatibility mode
su.getViewer().getView().setCompatibilityModeEnable(suFlag);


// set specail frustum
translate1.frustum(-1.0, 1.0, -1.0, 1.0, 2.0, 3.0);
su.getViewer().getView().setLeftProjection(translate1);


// Let Java 3D perform optimizations on this scene graph.
objRoot.compile();

return objRoot;
} // end of CreateSceneGraph method

After complie code and running it, a cube can be seen. But when I use setRightProjection instead of setLeftProjection, no figuer can be seen. I try to use setPhysicalBody() method to set the right and left eye position, It still dose not work.

Could someone please give me some helps to find out how to correctly set the eye position and how to set view frutum for left eye and right eye(the view frustum should not be symmetric) and middle eye( the view frustum is symmetric).

By the way, thanks to Hardy Henneberg and Marco Lohse for your suggestions.


Regards

Wei An
[EMAIL PROTECTED]
=========================================================================== 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