
################
A3DEntityGetType
################

.. c:function:: A3DStatus A3DEntityGetType(const A3DEntity *pEntity, A3DEEntityType *peEntityType)

   .. rst-class:: sig-pretty-signature
   
      | :c:enum:`~A3DStatus` A3DEntityGetType(*const* :c:type:`~A3DEntity`\ \* **pEntity**\ , :c:enum:`~A3DEEntityType`\ \* **peEntityType**\ )
   
   Gets the actual type of the entity.
   
   This function returns an integer that specifies an Entity type. The integer corresponds to one of the values described by the :c:enum:`~A3DEEntityType` enumeration.
   
   In case of non exposed surface or curve, the function abstracts away the entity type by filling-in ``peEntityType`` with either :c:enumerator:`~kA3DTypeSurfBase` or :c:enumerator:`~kA3DTypeCrvBase` respectively. This behavior is most commonly encountered with the Inventor format.
   
   
      2.0
   
   
   .. rubric:: Sample code
   
   
   .. code-block:: cpp
   
      /* code to get data from a representation item structure */
      A3DRiRepresentationItem* pRepItem; /* this is retrieved for example on a PartDefinition data */
      A3DInt32 iErr = A3D_SUCCESS;
      A3DEEntityType eType;
      
      if (A3DEntityGetType(pRepItem,&eType)==A3D_SUCCESS)
      {
          switch(eType)
          {
              case kA3DTypeRiPointSet:
              {
                  A3DRiPointSetData sData = A3D_MAKE_DATA(A3DTessBaseData);
                  iErr = A3DRiPointSetGet( pRepItem, &sData );
                  /* work with PointSet data... */
                  break;
              }
      
              /* treate other types of data */
              case ...:
      
              default:
                  return ERROR;
                  break;
          }
      }
   
   
   ..
   
      :c:type:`~A3DEntity`
   
   
   **Returns**
   
   
      ``A3D_SUCCESS`` on success, or an error code on failure
   
   




