Is Billboard in Scene?
-
- Posts: 15
- Joined: Fri Jan 02, 2009 1:25 pm
- Location: Around
- Contact:
Is Billboard in Scene?
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?
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.
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.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
- Posts: 15
- Joined: Fri Jan 02, 2009 1:25 pm
- Location: Around
- Contact: