implement part of the plane projector except the QP solver for BETA.