.. # split from OEMathFunctions.rst:306

.. include:: ../substitutions

.. oe:namespace:: OEMath

.. meta::
   :keywords: OEGeom3DGetCenterAndExtents

.. oe:function:: OEGeom3DGetCenterAndExtents

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

      .. oe:api::

         template<class T, class U>
         void OEGeom3DGetCenterAndExtents(const T* xyz, unsigned int ncoord,
                                          U* center, U* extents)

   .. oe:language:: python

      .. oe:api:: python

         OEGeom3DGetCenterAndExtents(xyz: OEFloatArray, ncoord: int,
                                     center: OEFloatArray,
                                     extents: OEFloatArray) -> None
         OEGeom3DGetCenterAndExtents(xyz: OEDoubleArray, ncoord: int,
                                     center: OEDoubleArray,
                                     extents: OEDoubleArray) -> None

   Determines the bounding box that can encompass all the points
   defined by ``xyz`` and ``ncoord``. The length of each side of the
   box output in the 3-element array ``extents``. The geometric center
   of the box is output to the ``center`` parameter.

   .. note::

      The center of the box is different from the center-of-mass.

