OEGeom3DGetCenterOfMass

template<class T, class U>
void OEGeom3DGetCenterOfMass(const T *xyz, unsigned int ncoord, U *com)
template<class T, class U, class Z>
void OEGeom3DGetCenterOfMass(const T *xyz, unsigned int ncoord, U *com,
                             Z *weights)

Calculates the center-of-mass for the coordinates given by xyz and places the cartesian center-of-mass in the output com argument. The number of 3-element cartesian coordinates is specified by the ncoord parameter. Note, weights can be specified to weight each of the cartesian points differently.