<?xml version="1.0"?>
<sdf version="1.5">
  <world name="default">
    <include>
      <uri>model://ground_plane</uri>
    </include>

    <include>
      <uri>model://sun</uri>
    </include>


    <!-- bowls around start region-->
    <include>
      <pose>-3 -3 0 0 0 0</pose>
      <uri>model://bowl</uri>
    </include>
    <include>
      <pose>3 3 0 0 0 0</pose>
      <uri>model://bowl</uri>
    </include>
   <include>
      <pose>-3 3 0 0 0 0</pose>
      <uri>model://bowl</uri>
    </include>
    <include>
      <pose>3 -3 0 0 0 0</pose>
      <uri>model://bowl</uri>
    </include>

    <!-- bowls around end region -->
    <include>
      <pose>7 7 0 0 0 0</pose>
      <uri>model://bowl</uri>
    </include>
    <include>
      <pose>13 13 0 0 0 0</pose>
      <uri>model://bowl</uri>
    </include>
   <include>
      <pose>7 13 0 0 0 0</pose>
      <uri>model://bowl</uri>
    </include>
    <include>
      <pose>13 7 0 0 0 0</pose>
      <uri>model://bowl</uri>
    </include>

    <plugin name="SimEvents" filename="libSimEventsPlugin.so">
      <session></session>

      <region>
        <name>start</name>
        <volume>
          <!-- min and max are ignition::math::Vector3d -->
          <!-- around the origin -->
          <min>-3 -3 -3</min>
          <max>3 3 3</max>
        </volume>
      </region>

      <region>
        <name>end</name>
        <volume>
          <!-- around 10,10  -->
          <min>7 7 -3</min>
          <max>13 13 3</max>
        </volume>
      </region>

      <event>
        <name>NewBeer</name>
        <type>existence</type>
        <model>beer</model>
      </event>

      <event>
        <name>Inactive</name>
        <type>sim_state</type>
        <!-- elements can be active or not,
        and this property can be set at runtime or in the world file
        with the active element
        by default, they are.
        -->
        <active>false</active>
      </event>

      <event>
        <name>All_spawn_and_delete</name>
        <type>existence</type>
        <!-- no model  is specified -->
      </event>

      <!-- when the simulation state changes (pause/play) -->
      <event>
        <name>Sim</name>
        <type>sim_state</type>
      </event>

      <!-- bounding box intersection event-->
      <event>
        <name>Can1_in_0_0</name>
        <type>inclusion</type>
        <model>can1</model>
        <region>start</region>
      </event>

      <!-- bounding box inclusion event -->
      <event>
        <name>Can1_in_10_10</name>
        <type>inclusion</type>
        <model>can1</model>
        <region>end</region>
      </event>
    </plugin>



    <!--
    spawn a few beers in the world
    -->
    <include>
      <pose>0 0 0 0 0 0</pose>
      <name>can1</name>
      <uri>model://beer</uri>
    </include>

  </world>
</sdf>
