public final boolean contact(Organism org) {
		int i,j;
		ExLine2DDouble line = new ExLine2DDouble();
		ExLine2DDouble bline = new ExLine2DDouble();
		// Check collisions for all segments
		for (i = _segments-1; i >= 0; i--) {
			// Consider only segments with modulus greater than 1
			if (_m[i]>=1) { 
				line.setLine(x1[i]+_centerX, y1[i]+_centerY, x2[i]+_centerX, y2[i]+_centerY);
				// First check if the line intersects the bounding box of the other organism
				if (org.intersectsLine(line)) {
					// Do the same for the other organism's segments.
					for (j = org._segments-1; j >= 0; j--) {
						if (org._m[j]>=1) {
							bline.setLine(org.x1[j] + org._centerX, org.y1[j] + org._centerY,
									org.x2[j] + org._centerX, org.y2[j] + org._centerY);
							if (intersectsLine(bline) && line.intersectsLine(bline)) {
								// If we found two intersecting segments, apply effects
								touchEffects(org,i,j,true);
								// Intersection point
								Point2D.Double intersec= line.getIntersection(bline);
								/* touchMove needs to know which is the line that collides from the middle (not
								 * from a vertex). Try to guess it by finding the vertex nearest to the
								 * intersection point.
								 */
								double dl1, dl2, dbl1, dbl2;
								dl1 = intersec.distanceSq(line.getP1());
								dl2 = intersec.distanceSq(line.getP2());
								dbl1 = intersec.distanceSq(bline.getP1());
								dbl2 = intersec.distanceSq(bline.getP2());
								// Use this to send the best choice to touchMove
								if (Math.min(dl1, dl2) < Math.min(dbl1, dbl2))
									touchMove(org,intersec,bline,false);
								else
									touchMove(org,intersec,line,true);
								
								OrganismCollidedEvent event = new OrganismCollidedEvent();
								actionCollidedListeners.fire().perform(event);
								
								// Find only one collision to speed up.
								return true;
							}
						}
					}
				}
			}
		}
		return false;
	}