.. _group__a3d__collision:

#####################
Collision computation
#####################

Determine if there are interferences between parts from an assembly. 

This functionality allows to determine if there are interferences (clashes) between parts from an assembly, and if a specified clearance distance is verified between parts (clearance analysis).

Depending on the nature of the analysis, one or two groups can be defined:


- One group: the analysis is processed on all the selected parts that are included in the group.
- Two groups: the analysis is processed between the two groups, but not inside the groups. 

**Parameters**


   **pGroup1**\ : define the first group of :c:struct:`~A3DTransfoRepresentationItemData`\ . 

   **pGroup2**\ : define a optional second group of :c:struct:`~A3DTransfoRepresentationItemData`\ . 

   **pParameterData**\ : set parameters for collision computation. 

   **uCollisionResultsSize**\ : Number of :c:struct:`~A3DCollisionResultData` in pCollisionResults. 

   **pCollisionResults**\ : Array of :c:struct:`~A3DCollisionResultData`\ , containing collision computation result. pCollisionResults is automatically allocated by A3DCollisionCompute. 


**Returns**


   ``A3D_SUCCESS`` on success, or an error code on failure


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

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


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


* :c:struct:`~A3DTransfoRepresentationItemData`
* :c:struct:`~A3DCollisionGroupData`
* :c:struct:`~A3DCollisionParameterData`
* :c:struct:`~A3DCollisionResultData`

.. rst-class:: kind-group kind-enumeration

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


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


* :c:enum:`~A3DECollisionType`

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

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


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


* :c:func:`~A3DCollisionCompute`

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

   ../structures/A3DTransfoRepresentationItemData
   ../structures/A3DCollisionGroupData
   ../structures/A3DCollisionParameterData
   ../structures/A3DCollisionResultData
   ../functions/A3DCollisionCompute
   ../enums/A3DECollisionType


