static Vector square(int face, float bottom, float left, float top, float right, float d) {
        Vector<Vector3d> sq = new Vector<>();
        Vector3d[] ps = new Vector3d[5];

        for (int i = 0; i < 5; i++) {
            ps[i] = new Vector3d(d, d, d);
            sq.addElement(ps[i]);
        }

        switch (face) {
            case YZF:
                ps[0].y = left;
                ps[0].z = bottom;
                ps[1].y = left;
                ps[1].z = top;
                ps[2].y = right;
                ps[2].z = top;
                ps[3].y = right;
                ps[3].z = bottom;
                break;

            case YZB:
                ps[0].y = left;
                ps[0].z = bottom;
                ps[3].y = left;
                ps[3].z = top;
                ps[2].y = right;
                ps[2].z = top;
                ps[1].y = right;
                ps[1].z = bottom;
                break;

            case ZXB:
                ps[0].x = left;
                ps[0].z = bottom;
                ps[1].x = left;
                ps[1].z = top;
                ps[2].x = right;
                ps[2].z = top;
                ps[3].x = right;
                ps[3].z = bottom;
                break;

            case ZXF:
                ps[0].x = left;
                ps[0].z = bottom;
                ps[3].x = left;
                ps[3].z = top;
                ps[2].x = right;
                ps[2].z = top;
                ps[1].x = right;
                ps[1].z = bottom;
                break;

            case XYF:
                ps[0].x = left;
                ps[0].y = bottom;
                ps[1].x = right;
                ps[1].y = bottom;
                ps[2].x = right;
                ps[2].y = top;
                ps[3].x = left;
                ps[3].y = top;
                break;

            case XYB:
                ps[0].x = left;
                ps[0].y = bottom;
                ps[3].x = left;
                ps[3].y = top;
                ps[2].x = right;
                ps[2].y = top;
                ps[1].x = right;
                ps[1].y = bottom;
                break;
        }

        ps[4].set(ps[0]);
        return sq;
    }