Calculates the center of the collection of objects defined by the given object and all of its descendants
The result is saved in the center argument.
("tree" means the whole family tree of the object)
Return value: returns the number of objects in the tree