Desiree,
what you can use is:
//get the viewpoint position, calc distance from model (e.g. 0,0,0) and
set clip
//Vector3d v3d = new Vector3d(0,0,0);
trans.get(v3f);
float[] t = {0,0,0};
v3f.get(t);
float dist = (float)(v3f.x + v3f.y + v3f.z)/30f;
transGroup.setTransform(trans);
thisView.setFrontClipDistance(dist);
// end new code
in the ViewerNavigationBehavior.
I attach the modified files as there are a few parameter changes and such.
Chris
Hilbring wrote:
> Hi,
>
> I tried to reconstruct a similar scene as in my real application.
> In the test program you can rotate and zoom. My problem is the
> intersection between the two planes with a front clipping distance of 1,
> as I need for the zooming the intesection line is somewhat triangled. With
> a front clipping distance of 100 it is fine.
> So can I adjust the front clipping distance during zooming? Or is there a
> way setting the clipping distances without this effect?
> Or how can I calculate the minimal front clipping distance I need?
> In my real Application the user can adjust the view in zooming in to the
> box, unfortunately with a clipping distance of 100 the box get clipped
> then.
>
> Thanks for your help Desiree
>
> PS The Main Class is ZBufferTest.java
>
> oooooooooooooooooooooooooooooooooooooooooooooooo
> Desiree Hilbring
>
> Institut fuer Photogrammetrie und Fernerkundung
> Universitaet Karlsruhe, Germany
> email: [EMAIL PROTECTED]
> # 0721 6083676
> oooooooooooooooooooooooooooooooooooooooooooooooo
>
>
>--------------------------------------------------------------------------------------------------------------------------------
> Name: zbuffer.zip
> zbuffer.zip Type: Zip Compressed Data (application/x-zip-compressed)
> Encoding: BASE64
--
,--_|\
/ Oz \
Chris Thorne :)_.--._/
[EMAIL PROTECTED] v
VariableZbufferWindow.zip