<!-- Light -->
<element name="light" required="*">
  <description>The light element describes a light source.</description>

  <attribute name="name" type="string" default="__default__" required="1">
    <description>A unique name for the light.</description>
  </attribute>

  <attribute name="type" type="string" default="point" required="1">
    <description>The light type: point, directional, spot.</description>
  </attribute>

  <element name="cast_shadows" type="bool" default="false" required="0">
    <description>When true, the light will cast shadows.</description>
  </element>

  <include filename="frame.sdf" required="*"/>
  <include filename="pose.sdf" required="0"/>

  <element name="diffuse" type="color" default="1 1 1 1" required="0">
    <description>Diffuse light color</description>
  </element>
  <element name="specular" type="color" default=".1 .1 .1 1" required="0">
    <description>Specular light color</description>
  </element>

  <element name="attenuation" required="0">
    <description>Light attenuation</description>
    <element name="range" type="double" default="10" required="1">
      <description>Range of the light</description>
    </element>
    <element name="linear" type="double" default="1" required="0">
      <description>The linear attenuation factor: 1 means attenuate evenly over the distance.</description>
    </element>
    <element name="constant" type="double" default="1" required="0">
      <description>The constant attenuation factor: 1.0 means never attenuate, 0.0 is complete attenutation.</description>
    </element>
    <element name="quadratic" type="double" default="0" required="0">
      <description>The quadratic attenuation factor: adds a curvature to the attenuation.</description>
    </element>
  </element> <!-- End Attenuation -->

  <element name="direction" type="vector3" default="0 0 -1" required="1">
    <description>Direction of the light, only applicable for spot and directional lights.</description>
  </element><!-- End Directional -->

  <element name="spot" required="0">
    <description>Spot light parameters</description>
    <element name="inner_angle" type="double" default="0" required="1">
      <description>Angle covered by the bright inner cone</description>
    </element>
    <element name="outer_angle" type="double" default="0" required="1">
      <description>Angle covered by the outer cone</description>
    </element>
    <element name="falloff" type="double" default="0" required="1">
      <description>The rate of falloff between the inner and outer cones. 1.0 means a linear falloff, less means slower falloff, higher means faster falloff.</description>
    </element>
  </element> <!-- End Spot -->

</element> <!-- End Light -->
