.. _group__a3d__graphics__module:

########
Graphics
########

Query and manipulate scene and rendering information. 

The graphics group provides the essential set of tools for describing a rendering scene, such as texturing, lighting or view information. The following entities are presents in this modules, along with their public data and access functions:


- ``A3DGraphAmbientLightData``
- \ ``A3DGraphCameraData``
- \ ``A3DGraphDirectionalLightData``
- \ ``A3DGraphHatchingPatternLineData``
- \ ``A3DGraphicsData``
- \ ``A3DGraphPointLightData``
- \ ``A3DGraphSceneDisplayParametersData``
- \ ``A3DGraphSpotLightData``
- \ ``A3DMiscCascadedAttributesData``

\ The module also provides a set of indexed data:


- ``A3DGraphDottingPatternData``
- \ ``A3DGraphHatchingPatternData``
- \ ``A3DGraphLinePatternData``
- \ ``A3DGraphMaterialData``
- \ ``A3DGraphPictureData``
- \ ``A3DGraphRgbColorData``
- \ ``A3DGraphSolidPatternData``
- \ ``A3DGraphStyleData``
- \ ``A3DGraphVPicturePatternData``


Any entity of the given type can be used as an ``A3DRootBaseWithGraphics``\ .


HOOPS Exchange provides a global container (``A3DGlobalData``\ ) which references each of these data using indexed lists. Thus, structures such as ``A3DGraphRgbColorData`` are obtained using an non-typed numerical index.

Yet, these data act as front-end for internal entities which are still referenced to by handles. The purpose of obtaining the underlying entity of an indexed data depends on the context and is generally an uncommon operation. As an example, the full PBR (Physically-Based Rendering) features is provided as an extension of ``A3DGraphMaterialData`` throughout its underlying entity. To retrieve the underlying entity of an indexed data, see ``A3DMiscPointerFromIndexGet``\ . 

**Parameters**


   **pLight**\ : A handle to the light to fetch data from. /

   **pData**\ : The ``A3DGraphAmbientLightData`` to fill in. / 


**Returns**


   ``A3D_SUCCESS`` or an error code in case of failure. / /



Index
=====

.. rubric:: Variables


.. rst-class:: api-xref-list


* :c:member:`~m_sDirection`
* :c:member:`~entity`


.. rst-class:: kind-group kind-record

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


.. rst-class:: api-xref-list


* :c:struct:`~A3DGraphicsData`
* :c:struct:`~A3DGraphStyleData`
* :c:struct:`~A3DGraphRgbColorData`
* :c:struct:`~A3DGraphLinePatternData`
* :c:struct:`~A3DGraphMaterialData`
* :c:struct:`~A3DGraphPictureData`
* :c:struct:`~A3DGraphDottingPatternData`
* :c:struct:`~A3DGraphHatchingPatternLineData`
* :c:struct:`~A3DGraphHatchingPatternData`
* :c:struct:`~A3DGraphSolidPatternData`
* :c:struct:`~A3DGraphVPicturePatternData`
* :c:struct:`~A3DMiscCascadedAttributesData`

.. rst-class:: kind-group kind-function

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


.. rst-class:: api-xref-list


* :c:func:`~A3DGraphicsGet`
* :c:func:`~A3DGraphicsCreate`
* :c:func:`~A3DGraphicsDelete`
* :c:func:`~A3DGlobalGetGraphStyleData`
* :c:func:`~A3DGlobalInsertGraphStyle`
* :c:func:`~A3DGlobalGetGraphRgbColorData`
* :c:func:`~A3DGlobalInsertGraphRgbColor`
* :c:func:`~A3DGlobalGetGraphLinePatternData`
* :c:func:`~A3DGlobalGetGraphMaterialData`
* :c:func:`~A3DGlobalInsertGraphMaterial`
* :c:func:`~A3DGlobalGetGraphPictureData`
* :c:func:`~A3DGlobalInsertGraphPicture`
* :c:func:`~A3DGlobalGetGraphDottingPatternData`
* :c:func:`~A3DGlobalInsertGraphDottingPattern`
* :c:func:`~A3DGlobalGetGraphHatchingPatternData`
* :c:func:`~A3DGlobalInsertGraphHatchingPattern`
* :c:func:`~A3DGlobalGetGraphSolidPatternData`
* :c:func:`~A3DGlobalInsertGraphSolidPattern`
* :c:func:`~A3DGlobalGetGraphVPicturePatternData`
* :c:func:`~A3DGlobalInsertGraphVPicturePattern`
* :c:func:`~A3DGraphCameraGet`
* :c:func:`~A3DGraphCameraCreate`
* :c:func:`~A3DGraphDirectionalLightGet`
* :c:func:`~A3DGraphDirectionalLightCreate`
* :c:func:`~A3DGraphSceneDisplayParametersGet`
* :c:func:`~A3DGraphSceneDisplayParametersCreate`
* :c:func:`~A3DMiscCascadedAttributesCreate`
* :c:func:`~A3DMiscCascadedAttributesDelete`
* :c:func:`~A3DMiscCascadedAttributesGet`
* :c:func:`~A3DMiscCascadedAttributesPush`
* :c:func:`~A3DMiscRootBaseInsertAttribute`

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

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


.. c:member:: A3DVector3dData m_sDirection

      .. rst-class:: sig-pretty-signature
      
         | :c:struct:`~A3DVector3dData`
      
      Fetches data from an ambient light source entity given its handle. / /. 
      
      
      ::
      
         \brief Data for an ambient light source entity (``)
      
       / / 
      
      
         2.0 / / An ambient light simulates lighting that bounces everywhere and thus comes / from no specific location. Ambient lights illuminate every face of an object / regardless of their position or orientation. / / All colors within this structure are global indexes to RGB color codes. The / actual values can be queried using ``A3DGlobalGetGraphRgbColorData``\ . / / ``A3DGraphAmbientLightData`` is one of the four light source types provided by / HOOPS. It is associated to the ``kA3DTypeGraphAmbientLight`` entity type. / The other available light sources are ``A3DGraphPointLightData``\ , / ``A3DGraphSpotLightData`` and ``A3DGraphDirectionalLightData``\ . / / 
      
      
      
         :c:func:`~A3DGlobalGetGraphRgbColorData` / 
      
      
      
         :c:func:`~A3DGlobalInsertGraphRgbColor` / 
      
      
      
         :c:struct:`~A3DGraphRgbColorData` / 
      
      
      
         :c:struct:`~A3DGraphMaterialData` / 
      
      
      
         A3DGraphDirectionalLightData / 
      
      
      
         A3DGraphPointLightData / 
      
      
      
         A3DGraphSpotLightData /
      
      
      
      typedef struct { :c:type:`~A3DUns16` m_usStructSize; // Reserved: will be initialized by :c:macro:`~A3D_INITIALIZE_DATA`\ . :c:type:`~A3DUns32` m_uiAmbientColorIndex; ///< The main or ambient color of the light source :c:type:`~A3DUns32` m_uiDiffuseColorIndex; ///< The diffuse color of the light source :c:type:`~A3DUns32` m_uiSpecularColorIndex; ///< The specular color of the light source } A3DGraphAmbientLightData; A3DAPI_LOAD
      
      **Parameters**
      
      
         **pLight**\ : A handle to the light to fetch data from. /
      
         **pData**\ : The ``A3DGraphAmbientLightData`` to fill in. / 
      
      
      **Returns**
      
      
         ``A3D_SUCCESS`` or an error code in case of failure. / /
      
      



.. c:member:: * other entity* * This function allows you to retrieve the entity handle behind an indexed* data From the entity

      .. rst-class:: sig-pretty-signature
      
         | **other entity **This function allows you to retrieve the entity handle behind an indexed *data From the*
      
      Retrieve the handle of an indexed entity. 
      
      
         2.0
      
      
      
      Even if they are usually accessed using a numerical index from the global data, entities such as ``A3DGraphMaterialData`` each have a handle like any 
      



.. toctree::
   :maxdepth: 1
   :hidden:

   ../structures/A3DGraphicsData
   ../structures/A3DGraphStyleData
   ../structures/A3DGraphRgbColorData
   ../structures/A3DGraphLinePatternData
   ../structures/A3DGraphMaterialData
   ../structures/A3DGraphPictureData
   ../structures/A3DGraphDottingPatternData
   ../structures/A3DGraphHatchingPatternLineData
   ../structures/A3DGraphHatchingPatternData
   ../structures/A3DGraphSolidPatternData
   ../structures/A3DGraphVPicturePatternData
   ../structures/A3DMiscCascadedAttributesData
   ../functions/A3DGraphicsGet
   ../functions/A3DGraphicsCreate
   ../functions/A3DGraphicsDelete
   ../functions/A3DGlobalGetGraphStyleData
   ../functions/A3DGlobalInsertGraphStyle
   ../functions/A3DGlobalGetGraphRgbColorData
   ../functions/A3DGlobalInsertGraphRgbColor
   ../functions/A3DGlobalGetGraphLinePatternData
   ../functions/A3DGlobalGetGraphMaterialData
   ../functions/A3DGlobalInsertGraphMaterial
   ../functions/A3DGlobalGetGraphPictureData
   ../functions/A3DGlobalInsertGraphPicture
   ../functions/A3DGlobalGetGraphDottingPatternData
   ../functions/A3DGlobalInsertGraphDottingPattern
   ../functions/A3DGlobalGetGraphHatchingPatternData
   ../functions/A3DGlobalInsertGraphHatchingPattern
   ../functions/A3DGlobalGetGraphSolidPatternData
   ../functions/A3DGlobalInsertGraphSolidPattern
   ../functions/A3DGlobalGetGraphVPicturePatternData
   ../functions/A3DGlobalInsertGraphVPicturePattern
   ../functions/A3DGraphCameraGet
   ../functions/A3DGraphCameraCreate
   ../functions/A3DGraphDirectionalLightGet
   ../functions/A3DGraphDirectionalLightCreate
   ../functions/A3DGraphSceneDisplayParametersGet
   ../functions/A3DGraphSceneDisplayParametersCreate
   ../functions/A3DMiscCascadedAttributesCreate
   ../functions/A3DMiscCascadedAttributesDelete
   ../functions/A3DMiscCascadedAttributesGet
   ../functions/A3DMiscCascadedAttributesPush
   ../functions/A3DMiscRootBaseInsertAttribute


