Matteo Bruni (@Mystral) commented about dlls/d3dx9_36/mesh.c:
return found;
}
+HRESULT WINAPI D3DXFrameCalculateBoundingSphere(const D3DXFRAME *frame_root, D3DXVECTOR3 *center, FLOAT *radius) +{
- FIXME("(%p, %p, %p) stub!\n", frame_root, center, radius);
- return E_NOTIMPL;
It shouldn't be too hard to implement this one, in theory. Basically, compute the min and max x, y, z coordinates over the vertices of the transformed mesh. The midpoint in the 3 coordinates will be the center, while the radius is the distance from the center to min(x, y, z) (or max(x, y, z), they should match).
I haven't checked that all that's required to get the transformed mesh is already in place, but at a quick look it looks like the basic functionality is there at least.