I'll post this as an answer, though it is by no means complete, simply because it is too large for a comment. This is a rather generalized response - what exact methods you require will depend on the frameworks you use for your rendering (or 3D object processing), in this case ARCore I suppose.
Goal: Find center
If I read you correctly, you intend to find the center of your 3D object. First you need to decide what exactly you mean by "center", because this decides, whether or not you need a bounding box at all.
Some options:
- Center of mass: A simple implementation of this is assuming all your vertices have equal weight and calculating an average over them. Disadvantage: If your vertices are not distributed uniformly, then the center will shift to whereever most vertices occur.
- Center of an Axis Aligned Bounding Box: In this case you use your world coordinate system or whatever coordinate system you defined your 3D object in and find
x_min
, y_min
, z_min
, x_max
, y_max
, z_max
. The center of your AABB is then simply the average of these two points. Disadvantage: Depending on 3D object orientation and dimensions the center of the AABB can be quite a bit off or not even inside the object at all.
- Center of an Oriented Bounding Box: However maybe you want to define your bounding box based on the dimensions of your 3D object. This case is similar to AABB, however with AABB your base vectors for your bounding box are aligned with the ones of your world coordinate system. For an OBB you need to find new base vectors, where one is typically parallel to the largest-distance-vector between two points in your 3D object and the other two are orthogonal to it and each other. Once the bounding box is found finding center is the same as with the AABB. Disadvantage: Finding bases is expensive.
Visual explanation of the three options described:
Center of Mass


Axis Aligned Bounding Box


Oriented Bounding Box


Further reading