private Line3D objectToCamera(Line3D line) {

		double[][] translation = new double[4][4];

		for (int i = 0; i < 4; i++) {
			translation[i][i] = 1;
		}

		translation[0][3] = -camera.getX();
		translation[1][3] = -camera.getY();
		translation[2][3] = -camera.getZ();

		double[][] rotation = new double[4][4];

		rotation[0][0] = Math.cos(camera.getRotation() * Math.PI / 180);
		rotation[0][1] = 0;
		rotation[0][2] = -Math.sin(camera.getRotation() * Math.PI / 180);

		rotation[1][0] = 0;
		rotation[1][1] = 1;
		rotation[1][2] = 0;

		rotation[2][0] = -Math.sin(camera.getRotation() * Math.PI / 180);
		rotation[2][1] = 0;
		rotation[2][2] = -Math.cos(camera.getRotation() * Math.PI / 180);

		rotation[3][3] = 1;

		double[][] combined = multiply(rotation, translation);

		double[][] start = multiply(combined, point3DToHomogenous(line.start));

		double[][] end = multiply(combined, point3DToHomogenous(line.end));

		return new Line3D(new Point3D(start[0][0], start[1][0], start[2][0]),
				new Point3D(end[0][0], end[1][0], end[2][0]));
	}