public function reset()
    {
        $this->closed = false;
        $this->points = array();
        $this->rewind();
        $this->numberOfPoints = 0;
        $this->diagonalPointXIndex = null;
        $this->diagonalPointYIndex = null;
    }