
############################
A3DGraphDirectionalLightData
############################

.. c:struct:: A3DGraphDirectionalLightData

   Data for a directional light source entity (``A3DGraphDirectionalLight``\ )
   
   
      2.0
   
   
   
      2.0
   
   
   A directional light simulates a source which is far away from the scene. In that situation, all light rays are coming from the same direction, regardless of the position of the illuminated object or the viewer. The illumination only depends on the light orientation, and not its position.
   
   All colors within this structure are global indexes to RGB color codes. The actual values can be queried using ``A3DGlobalGetGraphRgbColorData``\ .
   
   ``A3DGraphDirectionalLightData`` is one of the four light source types provided by HOOPS. It is associated to the ``kA3DTypeGraphDirectionalLight`` entity type. The other available light sources are ``A3DGraphAmbientLightData``\ , ``A3DGraphPointLightData`` and ``A3DGraphSpotLightData``\ .
   
   ``A3D_MAKE_DATA`` initializes ``m_dIntensity`` to ``0.0``\ . For a full-strength light, set ``m_dIntensity`` to ``1.0`` before calling ``A3DGraphDirectionalLightCreate``\ .
   
   Only directional lights have an intensity value. ``A3DGraphAmbientLightData``\ , ``A3DGraphPointLightData`` and ``A3DGraphSpotLightData`` have no equivalent field. For point and spot lights, the light colors set the strength and the attenuation factors reduce it with distance.
   
   
      HOOPS does not check or clamp the value of ``m_dIntensity``\ . ``A3DGraphDirectionalLightCreate`` stores any value, and some readers, such as the U3D reader, copy the value from the file without validation. It is up to your application to validate this value if needed.
   
   
   
      :c:func:`~A3DGraphDirectionalLightGet`
   
   
   
      :c:func:`~A3DGraphDirectionalLightCreate`
   
   
   
      :c:struct:`~A3DGraphRgbColorData`
   
   
   
      :c:func:`~A3DGlobalGetGraphRgbColorData`
   
   
   
      :c:func:`~A3DGlobalInsertGraphRgbColor`
   
   
   
      :c:struct:`~A3DGraphMaterialData`
   
   
   
      :c:struct:`~A3DGraphAmbientLightData`
   
   
   
      :c:struct:`~A3DGraphPointLightData`
   
   
   
      :c:struct:`~A3DGraphSpotLightData`
   
   
   Directional light source data.
   
   
   Index
   =====
   
   .. rubric:: Variables
   
   
   .. rst-class:: api-xref-list
   
   
   * :c:member:`~A3DGraphDirectionalLightData.m_dIntensity`
   * :c:member:`~A3DGraphDirectionalLightData.m_sDirection`
   * :c:member:`~A3DGraphDirectionalLightData.m_uiAmbientColorIndex`
   * :c:member:`~A3DGraphDirectionalLightData.m_uiDiffuseColorIndex`
   * :c:member:`~A3DGraphDirectionalLightData.m_uiSpecularColorIndex`
   
   



.. rst-class:: kind-group kind-variable

.. rubric:: Variables
   :class: kind-group-title


.. c:member:: A3DUns32 A3DGraphDirectionalLightData.m_uiAmbientColorIndex

      .. rst-class:: sig-pretty-signature
      
         | :c:type:`~A3DUns32`
      
      The main or ambient color of the light source.
      



.. c:member:: A3DUns32 A3DGraphDirectionalLightData.m_uiDiffuseColorIndex

      .. rst-class:: sig-pretty-signature
      
         | :c:type:`~A3DUns32`
      
      The diffuse color of the light source.
      



.. c:member:: A3DUns32 A3DGraphDirectionalLightData.m_uiSpecularColorIndex

      .. rst-class:: sig-pretty-signature
      
         | :c:type:`~A3DUns32`
      
      The specular color of the light source.
      



.. c:member:: A3DDouble A3DGraphDirectionalLightData.m_dIntensity

      .. rst-class:: sig-pretty-signature
      
         | :c:type:`~A3DDouble`
      
      The intensity coefficient of the light source, expected in ``[0.0 ; 1.0]``\ , where ``1.0`` is full intensity.
      



.. c:member:: A3DVector3dData A3DGraphDirectionalLightData.m_sDirection

      .. rst-class:: sig-pretty-signature
      
         | :c:struct:`~A3DVector3dData`
      
      The direction of the light source, in world space coordinates.
      




