Page 1 of 1

Is Billboard in Scene?

Posted: Tue Apr 28, 2009 8:08 am
by tomhancocks
Is there a way built in to irrlicht to determine if a billboard object is visible to the player? (I.e on screne/in scene), or does it require some custom functionality?

Posted: Tue Apr 28, 2009 3:13 pm
by CuteAlien
I think you will have to code a little to get that.

You can find out what is visible in the scene by checking the view frustum. You get that from your active camera with SViewFrustum * frustum = camera->getViewFrustum ();

For a first check you might compare the boundingboxes of frustum and scenenode - if you only need a fast test to ignore nodes that might be already good enough. Otherwise I think you will have to work your way through the math.

Posted: Tue Apr 28, 2009 4:58 pm
by tomhancocks
Hmm, that shouldn't be much of a problem. I just didn't want to start doing something only to find I had reinvented the wheel :lol:

Posted: Tue Apr 28, 2009 9:04 pm
by hybrid
Maybe it would be wise to give access to the culling method. That way one could check for visibility just as the scene manager does. Another alternative would be a visibility map which can be queried after the render loop.. That's much more expensive, though.