(self, random_state)
Regenerates this corridor.

    New values are drawn from the `corridor_width` and `corridor_height`
    distributions specified in `_build`. The corridor is resized accordingly.

    Args:
      random_state: A `numpy.random.RandomState` object that is passed to the
        `Variation` objects.
Regenerates this corridor.
Regenerates this corridor .
def regenerate(self, random_state):
    """Regenerates this corridor.

    New values are drawn from the `corridor_width` and `corridor_height`
    distributions specified in `_build`. The corridor is resized accordingly.

    Args:
      random_state: A `numpy.random.RandomState` object that is passed to the
        `Variation` objects.
    """
    self._walls_body.geom.clear()
    corridor_width = variation.evaluate(self._corridor_width,
                                        random_state=random_state)
    corridor_length = variation.evaluate(self._corridor_length,
                                         random_state=random_state)
    self._current_corridor_length = corridor_length
    self._current_corridor_width = corridor_width

    self._ground_plane.pos = [corridor_length / 2, 0, 0]
    self._ground_plane.size = [
        corridor_length / 2 + _CORRIDOR_X_PADDING, corridor_width / 2, 1]

    self._left_plane.pos = [
        corridor_length / 2, corridor_width / 2, _SIDE_WALL_HEIGHT / 2]
    self._left_plane.size = [
        corridor_length / 2 + _CORRIDOR_X_PADDING, _SIDE_WALL_HEIGHT / 2, 1]

    self._right_plane.pos = [
        corridor_length / 2, -corridor_width / 2, _SIDE_WALL_HEIGHT / 2]
    self._right_plane.size = [
        corridor_length / 2 + _CORRIDOR_X_PADDING, _SIDE_WALL_HEIGHT / 2, 1]

    self._near_plane.pos = [
        -_CORRIDOR_X_PADDING, 0, _SIDE_WALL_HEIGHT / 2]
    self._near_plane.size = [corridor_width / 2, _SIDE_WALL_HEIGHT / 2, 1]

    self._far_plane.pos = [
        corridor_length + _CORRIDOR_X_PADDING, 0, _SIDE_WALL_HEIGHT / 2]
    self._far_plane.size = [corridor_width / 2, _SIDE_WALL_HEIGHT / 2, 1]
def regenerate ( self , random_state ) : self . _walls_body . geom . clear ( ) corridor_width = variation . evaluate ( self . _corridor_width , random_state = random_state ) corridor_length = variation . evaluate ( self . _corridor_length , random_state = random_state ) self . _current_corridor_length = corridor_length self . _current_corridor_width = corridor_width self . _ground_plane . pos = [ corridor_length / 2 , 0 , 0 ] self . _ground_plane . size = [ corridor_length / 2 + _CORRIDOR_X_PADDING , corridor_width / 2 , 1 ] self . _left_plane . pos = [ corridor_length / 2 , corridor_width / 2 , _SIDE_WALL_HEIGHT / 2 ] self . _left_plane . size = [ corridor_length / 2 + _CORRIDOR_X_PADDING , _SIDE_WALL_HEIGHT / 2 , 1 ] self . _right_plane . pos = [ corridor_length / 2 , - corridor_width / 2 , _SIDE_WALL_HEIGHT / 2 ] self . _right_plane . size = [ corridor_length / 2 + _CORRIDOR_X_PADDING , _SIDE_WALL_HEIGHT / 2 , 1 ] self . _near_plane . pos = [ - _CORRIDOR_X_PADDING , 0 , _SIDE_WALL_HEIGHT / 2 ] self . _near_plane . size = [ corridor_width / 2 , _SIDE_WALL_HEIGHT / 2 , 1 ] self . _far_plane . pos = [ corridor_length + _CORRIDOR_X_PADDING , 0 , _SIDE_WALL_HEIGHT / 2 ] self . _far_plane . size = [ corridor_width / 2 , _SIDE_WALL_HEIGHT / 2 , 1 ]