Hi everybody,
I am using ModelClip for clipping a part of my scene by 4 vertical
clipping planes, defined with ModelClip. I am interested in the extent of
the remaining object. How could I calculate that?
Thanks for your help in advance
Desiree
That's how the planes are created:
modelClip = new ModelClip();
modelClip.setCapability(ModelClip.ALLOW_ENABLE_WRITE);
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) left 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);
modelClip.setInfluencingBounds(gis3dView.getMouseBounds());
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".