public static void processSphereSphereCollision(RigidBody sphere1,
			RigidBody sphere2, double restitution, double timeStep) {

		// Predicted positions
		Vector3d sphere1Position = new Vector3d();
		Vector3d sphere2Position = new Vector3d();
		Quat4d planeRotration = new Quat4d();
		Quat4d sphereRotration = new Quat4d();
		sphere1.predictCollisionPosition(timeStep, sphere1Position,
				planeRotration);
		sphere2.predictCollisionPosition(timeStep, sphere2Position,
				sphereRotration);

		// Collision normal
		Vector3d normal = new Vector3d(sphere2Position);
		normal.sub(sphere1Position);

		// Non-interpenetrating pair
		if (normal.lengthSquared() < (((SphereObject) sphere1
				.getCollisionObject()).getRadius() + ((SphereObject) sphere2
				.getCollisionObject()).getRadius())
				* (((SphereObject) sphere1.getCollisionObject()).getRadius() + ((SphereObject) sphere2
						.getCollisionObject()).getRadius())) {
			return;
		}
		normal.normalize();

		// Intersecting points and cross product matrices
		Vector3d r1 = new Vector3d(normal);
		Vector3d r2 = new Vector3d(normal);
		r1.scale(((SphereObject) sphere1.getCollisionObject()).getRadius());
		r2.scale(-((SphereObject) sphere2.getCollisionObject()).getRadius());
		Matrix3d cross1 = new Matrix3d(0, -r1.z, r1.y, r1.z, 0, -r1.x, -r1.y,
				r1.x, 0);
		Matrix3d cross2 = new Matrix3d(0, -r2.z, r2.y, r2.z, 0, -r2.x, -r2.y,
				r2.x, 0);

		// Relative velocity
		Vector3d relativeVelocity = new Vector3d();
		relativeVelocity.cross(sphere2.getAngularVelocity(), r2);
		Vector3d angularVelocity = new Vector3d();
		angularVelocity.cross(sphere1.getAngularVelocity(), r1);
		relativeVelocity.sub(angularVelocity);
		relativeVelocity.add(sphere2.getLinearVelocity());
		relativeVelocity.sub(sphere1.getLinearVelocity());

		// Separating velocity
		if (relativeVelocity.dot(normal) > 0) {
			return;
		}

		/*
		 * K = I/m + transpose(r*) I^-1 r*
		 */
		Matrix3d k = new Matrix3d(cross1);
		k.transpose();
		k.mul(sphere1.getInertiaLocalInverse());
		k.mul(cross1);
		k.add(new Matrix3d(1 / sphere1.getMass(), 0, 0, 0, 1 / sphere1
				.getMass(), 0, 0, 0, 1 / sphere1.getMass()));
		Matrix3d k2 = new Matrix3d(cross2);
		k2.transpose();
		k2.mul(sphere2.getInertiaLocalInverse());
		k2.mul(cross2);
		k2.add(new Matrix3d(1 / sphere2.getMass(), 0, 0, 0, 1 / sphere2
				.getMass(), 0, 0, 0, 1 / sphere2.getMass()));
		k.add(k2);

		processCollision(sphere1, r1, sphere2, r2, relativeVelocity, normal, k,
				restitution, timeStep);
	}