Hi everybody,

I have a box in my scene which is intersected by several horizontal
layers. I want to clip the box. For this I am defining  4
planes with ModelClip:

ModelClip modelClip = new ModelClip();
                boolean enables[] = {false,false,false,false,false,false};

                System.out.println("n "+siteLayer.getNorthValue());
                System.out.println("e "+siteLayer.getEastValue());

                // parallel to x (east) before box
                double dist =
siteLayer.getNorthValue()-siteLayer.getWidth();
                Vector4d plane1 = new Vector4d(0.0,0.0,1.0,dist);

                // parallel to z (north) right of box
                dist = siteLayer.getEastValue()+siteLayer.getLength();
                System.out.println(dist);
                Vector4d plane2 = new Vector4d(1.0,0.0,0.0,-dist);

                //parallel to x (east) after box
                dist = siteLayer.getNorthValue()+siteLayer.getWidth();
                Vector4d plane3 = new Vector4d(0.0,0.0,1.0,dist);

                // parallel to z (north) right of box
                //dist = siteLayer.getEastValue()+siteLayer.getLength();
                //Vector4d plane4 = new Vector4d(1.0,0.0,0.0,dist);

                modelClip.setEnables(enables);
                modelClip.setPlane(1,plane1);
                modelClip.setPlane(2,plane2);
                modelClip.setPlane(3,plane3);
                //modelClip.setPlane(4,plane4);
                modelClip.setEnable(1,true);
                modelClip.setEnable(2,true);
                modelClip.setEnable(3,true);
                //modelClip.setEnable(4,true);
                System.out.println(gis3dView.getMouseBounds().toString());

                modelClip.setInfluencingBounds(gis3dView.getMouseBounds());
                bg.addChild(modelClip);
                sceneNavTg.addChild(bg);

currently I am just setting 3 planes, the first two clip as I want them
two, but defining the 3rd plane, just cuts of more of the one side, of the
scene, where the first plane is defined. How do I specify which side of
the defined plane is clipped?

Thanks for your help in advance

Desiree

oooooooooooooooooooooooooooooooooooooooooooooooo
Desiree Hilbring

Institut fuer Photogrammetrie und Fernerkundung
Universitaet Karlsruhe, Germany
email: [EMAIL PROTECTED]
# 0721 6083676
oooooooooooooooooooooooooooooooooooooooooooooooo

===========================================================================
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".

Reply via email to