And!
As I tried to point out in some older posts, beware of parenting, because to scale a parent means to scale all its children, so I am using this to calculate the real size of the object:
public static SimpleVector getSize(Object3D object){
float[] bbox = object.getMesh().getBoundingBox();
Log.i("Util","getSize-bbox:"+Util.floatArrayToString(bbox));
float s = object.getScale();
Log.i("Util","getSize-scale:"+object.getScale());
Object3D[] par;
par = object.getParents();
while(par.length>0){
s = s*par[0].getScale();
Log.i("Util","getSize-parent:"+par[0].getScale());
par = par[0].getParents();
}
SimpleVector out = new SimpleVector((bbox[1]-bbox[0])*s,(bbox[3]-bbox[2])*s,(bbox[5]-bbox[4])*s);
Log.i("Util", "getSize:"+out.toString());
return out;
}
Enjoy,
Darai.