Well, I am using a behavior subclass to modify the view using lookAt()...and the keyboard....this works fine with projection...but when i do parallel and use ortho(), it is like everything is squeezed ... all I see is a line...(instead of all the objects in my universe)....i have messed with the ortho params to no end....and i still cannot see anything.....when i change the direction of view via the lookAt() method....the "line" seems to somehow change...it kind of blinks as i move...but i can't see anything....

I am wondering specifically....has anyone used the ortho() method....iand do you have to do:

 view.setLeftProjection(t);
  view.setRightProjection(t);

?

or do you have to do:  

  view.setVpcToEc(t);

?

 

 

 "Nitin.Jain" <[EMAIL PROTECTED]> wrote:

There's nothing special I'm doing except for the fact that I'm using SimpleUniverse utility to create the view branch. In one of the method I use the following piece of code to set the parallel projection.
 
m_universe.getViewer().getView().setProjectionPolicy(View.PARALLEL_PROJECTION);
 
can you specify what happens when you set this policy?
 
nitin
-----Original Message-----
From: Edward Pataky [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 04, 2003 8:22 PM
To: [EMAIL PROTECTED]
Subject: Re: [JAVA3D] Java3D - Orthographic views

I did that....could you send me a code snippet?  I would appreciate it....

Ed

 "Nitin.Jain" <[EMAIL PROTECTED]> wrote:

Did you try view.setProjectionPolicy(View.PARALLEL_PROJECTION)...that works just fine for me.
 
cheers,
nitin
-----Original Message-----
From: Edward Pataky [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 04, 2003 12:50 PM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] Java3D - Orthographic views

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



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



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

Reply via email to