.. # split from OEMathFunctions.rst:495

.. include:: ../substitutions

.. oe:namespace:: OEMath

.. meta::
   :keywords: OEGeom3DRotate

.. oe:function:: OEGeom3DRotate

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

      .. oe:api::

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

   .. oe:language:: python

      .. oe:api:: python

         OEGeom3DRotate(xyz: OEFloatArray, m: OEDoubleArray, ncoord: int) -> None
         OEGeom3DRotate(xyz: OEDoubleArray, m: OEDoubleArray, ncoord: int) -> None
         OEGeom3DRotate(xyz: OEFloatArray, m: OEDoubleArray, idx: int,
                        ncoord: int) -> None
         OEGeom3DRotate(xyz: OEDoubleArray, m: OEDoubleArray, idx: int,
                        ncoord: int) -> None

   Rotates the coordinates of ``xyz`` using the :math:`3x3` rotation matrix
   given by ``m``. The second form only rotates the coordinates
   according to the indices given by ``idx``. 
 
   *xyz*
      Array of coordinates to rotate

   *r*
      rotation matrix

   *ncoord*
      Number of coordinate sets to rotate

   *idx*
      Indices of the coordinates to rotate
