Bounding Box of ISceneNode

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Alpha Omega
Posts: 288
Joined: Wed Oct 29, 2008 12:07 pm

Bounding Box of ISceneNode

Post 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.
Iyad
Posts: 140
Joined: Sat Mar 07, 2009 1:18 am
Location: Montreal, Canada

Post 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.
#include <Iyad.h>
Alpha Omega
Posts: 288
Joined: Wed Oct 29, 2008 12:07 pm

Post by Alpha Omega »

Thank you i thought I tried this before and it didn't work but yes it works fine now. Thank you!
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post 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.
Post Reply