Bounding sphere dimensions

Is there an easy way to find the radius of the BoundingSphere of Node created from a loaded model?



Thanks.

? getModelBound().getWidth()/2

I thought there might be something like that, but when I try it errors with "The method getModelBound() is undefined for the type Node"

Hello, I am still newbie in jME but I try to answer.

I looked for such a method, too. But then I realized, there is only getWorldBound(), not getModelBound(). In fact the world bound is what I was interested in. Before you can access the world bound you must be sure it is initialized or updated. Sometimes you have to call updateWorldBound() or in some cases even updateGeometricState(0, true) first. The dimensions are also not directly accessible from there, as far as I can see. A cast to either BoundingBox() or BoundingSphere() is nessessary. I guess that's because the intersectsXXX methods are intended for this purpose instead of direct operations.



I hope this could help.