.. # split from OEMathFunctions.rst:555

.. include:: ../substitutions

.. oe:namespace:: OEMath

.. meta::
   :keywords: OEGeom3DTranslate

.. oe:function:: OEGeom3DTranslate

   .. oe:language:: c++ java csharp

      .. oe:api::

         template<class T, class U>
         void OEGeom3DTranslate(T* xyz, const U* t, unsigned int ncoord)
         template<class T, class U>
         void OEGeom3DTranslate(T* xyz, const U* t, unsigned int* idx,
                                unsigned int ncoord)

   .. oe:language:: python

      .. oe:api:: python

         OEGeom3DTranslate(xyz: OEFloatArray, t: OEDoubleArray, ncoord: int) -> None
         OEGeom3DTranslate(xyz: OEDoubleArray, t: OEDoubleArray, ncoord: int) -> None
         OEGeom3DTranslate(xyz: OEFloatArray, t: OEDoubleArray, idx: int,
                           ncoord: int) -> None
         OEGeom3DTranslate(xyz: OEDoubleArray, t: OEDoubleArray, idx: int,
                           ncoord: int) -> None

   Translates the three dimensional coordinates by the vector passed as the 
   argument ``t``.  The vector ``t`` must be of size three and contain the Cartesian
   translation vector.  For ``ncoord`` sets of coordinates the input array ``xyz``
   is expected to have at least a length of :math:`3*ncoord`.  The second form only 
   translates the coordinates according to the indices given by ``idx``.

   *xyz*
      Array of coordinates to translate

   *t*
      Translation vector array

   *ncoord*
      Number of coordinate sets to translate

   *idx*
      Index of the coordinates to translate
