I think your missing the defiition of the viewing axes. You set up a camera
on a tripod that is facing down the Z axis.
Then you centered a box in the viewing area with the left edge at -.5, right
edge at .5 and the top at .5 and bottom at -.5.
Then you moved the box two meters to the right, pass the 1.0 right edge of
your view. So now it is out of sight. If your
interest in the front or back clipping, then move the box in the Z
direction.
> ----------
> From: Demetrius[SMTP:[EMAIL PROTECTED]]
> Reply To: Discussion list for Java 3D API
> Sent: Sunday, April 02, 2000 8:43 PM
> To: [EMAIL PROTECTED]
> Subject: [JAVA3D] Confusion
>
> There is something very basic I think I'm missing about the Java3D view
> model. It seems to me that all coordinates must be between -1 and 1
> (unless a scale trans form is used to). Meaning if I take a box with
> vertices at (-0.5,0.5,0),(0.5,0.5,0),(0.5,-0.5,0), and (-0.5,-0.5,0) and
> add it to a transform group than has it's translation set to (2,0,0) the
> box out of my viewing volume. Even though my backClipDistnace is 10000,
> and my front clip distance is 0.1. Can anyone explain what I'm missing?
>
> Thanks in advance!
> Demetrius
>
> Example: check comments for farther explanation
>
> public void init()
> {
> setLayout(new BorderLayout());
> Canvas3D canvas = new Canvas3D(null);
> add("Center", canvas);
> VirtualUniverse universe = new VirtualUniverse();
> View view = new View();
> view.setPhysicalBody(new PhysicalBody());
> view.setPhysicalEnvironment(new PhysicalEnvironment());
> ViewPlatform vp = new ViewPlatform();
> view.attachViewPlatform(vp);
> view.addCanvas3D(canvas);
> view.setCompatibilityModeEnable(true);
> view.setFrontClipDistance(0.1);
> view.setProjectionPolicy(View.PERSPECTIVE_PROJECTION);
> view.setBackClipDistance(10000.0);
> Locale locale = new Locale(universe);
> BranchGroup b = new BranchGroup();
> TransformGroup trans = new TransformGroup();
> trans.addChild(vp);
> b.addChild(trans);
> locale.addBranchGraph(b);
>
> QuadArray ta = new QuadArray(4,QuadArray.COORDINATES);
> Point3f cords[] = new Point3f[4];
> // HERE if any of these are greater than 1 I get a white screen!
> // If any of the coordinates are less than -1 then I get nothing on the
> screen!
> cords[0] = new Point3f(0.1f, -0.1f, -0.9f);
> cords[1] = new Point3f(0.1f, 0.1f, -0.9f);
> cords[2] = new Point3f(-0.1f, 0.1f, -0.9f);
> cords[3] = new Point3f(-0.1f, -0.1f, -0.9f);
> ta.setCoordinates(0,cords);
> t3d = new Transform3D();
> // if I set the transform vector a x or y component of greater then 1 the
> box appears off the screen.
> t3d.set(new Vector3d(1,0,1));
> TransformGroup tgroup = new TransformGroup(t3d);
> tgroup.addChild(new Shape3D(ta,new Appearance()));
> b2.addChild(tgroup);
> locale.addBranchGraph(b2);
> }
>
>
===========================================================================
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".