Page 1 of 1

Bounding Box of ISceneNode

Posted: Sun Jan 09, 2011 4:39 pm
by Alpha Omega
I am trying to get the bounding box of a node after applying a mesh and I always get the default box Minedge = {-1,-1,-1} and Maxedge = {1,1,1} returned. Is this a known bug? I was debugging and

Code: Select all

aabbox3d<f32> box =  node->getBoundingBox();
Always returns the default box everytime.

Posted: Sun Jan 09, 2011 7:31 pm
by Iyad
I think you should use :

Code: Select all

virtual const core::aabbox3d< f32 >  getTransformedBoundingBox () const  
Get the axis aligned, transformed and animated absolute bounding box of this node.

Posted: Sun Jan 09, 2011 8:35 pm
by Alpha Omega
Thank you i thought I tried this before and it didn't work but yes it works fine now. Thank you!

Posted: Sun Jan 09, 2011 9:30 pm
by hybrid
Try to access the bbox after registering the mesh (or drawing the first frame). Maybe UpdateAbsolutePosition is also enough. Irrlicht tries to update some information only during rendering.