.. _group__a3d__ripointset:

############################
PointSet Representation Item
############################

An :c:type:`~A3DRiPointSet` is a set of 3D points.

When the :c:func:`~A3DRiPointSetGet` function populates an :c:struct:`~A3DRiPointSetData` structure, it allocates arrays of coordinates. When you no longer need the :c:struct:`~A3DRiPointSetData` structure, invoke the :c:func:`~A3DRiPointSetGet` function with the first argument set to NULL to free its allocated memory.


Sample code
===========

.. code-block:: cpp

   A3DInt32 iErr = A3D_SUCCESS;
   A3DRiPointSet* pA3DRiPointSet = A3D_NULL_HANDLE;
   
   /* Should call something here in order to get a valid A3DRiPointSet */
   
   A3DRiPointSetData sData = A3D_MAKE_DATA(A3DRiPointSetData);
   iErr = A3DRiPointSetGet( pA3DRiPointSet , &sData );
   if ( iErr == A3D_SUCCESS )
   {
       for (A3DUns32 ui=0;ui<sData.m_uiSize;ui++)
       {
           /* Insert here your own code to use PointSet data : sData.m_pdX[ui], sData.m_pdY[ui], sData.m_pdZ[ui] */
       }
       iErr = A3DRiPointSetGet(A3D_NULL_HANDLE, &sData );
   }


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

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


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


* :c:func:`~A3DRiPointSetCreate`
* :c:func:`~A3DRiPointSetEdit`
* :c:func:`~A3DRiPointSetGet`


