I load a vrml file which is a cylinder (d=105mm, h=180mm) to java 3d viewer but I can not see it clearly. The code is like following,
Transform3D viewTrans = new Transform3D(); Transform3D eyeTrans = new Transform3D();
sceneBounds = (BoundingSphere)branchRoot.getBounds(); Point3d center = new Point3d(); Vector3d temp = new Vector3d(center); viewTrans.set(temp);
temp.x = 0.0; temp.y = 0.0; temp.z = 200;
eyeTrans.set(temp); viewTrans.mul(eyeTrans);
universe.getViewingPlatform().getViewPlatformTransform().setTransform(viewTrans);
only when I set temp.z = 200 I can see something otherwise nothing shows up. I also loaded a small cylinder(r=1) before and set temp.z = 10 and it works great.
Anyone can tell me anything wrong within my code? =========================================================================== 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".
You will only be able to see objects that appear in front of your View object. Just like a camera cannot film objects that are behind it, the View will not render objects that are behind it either. By setting temp.z to 200, you are moving the camera back far enough to see your objects.
Try playing with different temp.z values to determine where the best place to position your view is. Alternatively, keep your view in place and move your objects back into space by giving them a negtive translation along z.
Mark McKay
=========================================================================== 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".