.getPlane().classifyPoint(p2b)) {
Vec3D intersect = null;
intersect = (Vec3D) slicePlane.getPlane()
.getIntersectionWithRay(
new Ray3D(p2b, p1b.sub(p2b)));
if (intersect == null)
intersect = (Vec3D) slicePlane
.getPlane()
.getIntersectionWithRay(
new Ray3D(p1b, p2b.sub(p1b)));
Vec2D intexsecX = new Vec2D(intersect.x,
intersect.y);
if (intersect != null) {
intersect.subSelf(slicePlane.getPlane());
intersect
.rotateY((float) (functions.angleOf(new Vec2D(
slicePlane.getPlane().normal.x,
slicePlane.getPlane().normal.z)) - (Math.PI / 2)));
float rotateAn = (functions
.angleOf(new Vec2D(
slicePlane.getPlane().normal.x,
slicePlane.getPlane().normal.y)));
if (rotateAn < Math.PI / 2
|| rotateAn > (Math.PI / 2) * 3)
rotateAn = (float) ((Math.PI * 2) - Math
.abs(rotateAn));
intersect.rotateX(rotateAn);
List<Vec2D> listItem = new ArrayList<Vec2D>();
listItem.add(new Vec2D(intersect.x,
intersect.y));
listItem.add(intexsecX);
returnList.add(listItem);
//t = 2;
}
}
}
} else {
Vec3D intersect = null;
intersect = (Vec3D) slicePlane.getPlane()
.getIntersectionWithRay(
new Ray3D(p2, p1.sub(p2)));
if (intersect == null)
intersect = (Vec3D) slicePlane.getPlane()
.getIntersectionWithRay(
new Ray3D(p1, p2.sub(p1)));
if (intersect != null) {
Vec2D intexsecX = new Vec2D(intersect.x,
intersect.y);