does anyone know how to set up an orthographic view?

I can do a perspective easy like shown below but orthographic doesn't work!!!!!!!

please help?????????? 

--------------------------------------------------
  // perspective vars
  double fovx = (double)(Math.PI*((double)1/2));
  double aspect = (double)800.0/600.0;
  double zNear = (double)3*100;
  double zFar = (double)100000.0*100;
  t.perspective(fovx, aspect, zNear, zFar);

  // ortho vars
  double left = (double) 1000;
  double right = (double) 1000;
  double bottom = (double) 1000;
  double top = (double) 1000;
  double near = (double) 1;
  double far = (double) 10000;
  //t.frustum(left, right, bottom, top, near, far);
  //t.ortho(left, right, bottom, top, near, far);

  view.setLeftProjection(t);
  view.setRightProjection(t);
  t.lookAt(new Point3d(1.0, 0.2, 0.0), // eye
    new Point3d(0.0, 0.2 , 0.0), // center
    new Vector3d(0.0, 1.0, 0.0)); // up

  view.setVpcToEc(t);

  bounds =
      new BoundingSphere(
   new Point3d(0.0,0.0,0.0), 100*100000.0);


  Transform3D t2 = new Transform3D();
  ViewPlatform vp = new ViewPlatform();
  vpTrans = new TransformGroup(t2);
  vpTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE|
   TransformGroup.ALLOW_TRANSFORM_READ);
  vpTrans.addChild(vp);
  vpRoot.addChild(vpTrans);

  DS = new doStuff(t, view);
  DS.setSchedulingBounds(bounds);
  vpTrans.addChild(DS);

-------------------------------------------------



Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now

Reply via email to