I propose a new interface isCulled(const aabbox3df &box, const E_CULLING_TYPE type).
The current node interface would become a thin wrapper over this new function, while the new function would enable more flexible custom culling checks for the situations when you don't have a scene node, but a mere box.
Certainly coding a box check out is simple, but this interface would enable any of the culling checks to be performed easily on an arbitrary box.
Extending the isCulled interface
Re: Extending the isCulled interface
Hm, I can only see how to implement that additionally. Otherwise EAC_OCC_QUERY and EAC_FRUSTUM_BOX both don't seem to work as they do work now (maybe they could be rewritten, can't tell on a quick view). Also interesting that EAC_FRUSTUM_SPHERE doesn't seem to be supported, but not even a comment about that in the documentation *sigh*.
edit: I just noticed that we have an own version in our application code here which replaces another parameter - we made the camera flexible. And I have the feeling at least that would make sense. Checking custom bboxes certainly also a good idea, but I suppose we should add a second function for that.
edit: I just noticed that we have an own version in our application code here which replaces another parameter - we made the camera flexible. And I have the feeling at least that would make sense. Checking custom bboxes certainly also a good idea, but I suppose we should add a second function for that.
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
Re: Extending the isCulled interface
I have implemented both EAC_FRUSTUM_SPHERE and EAC_CONE_SPHERE, and the prior of those has been sitting in the patch tracker for six months now.*
Occlusion queries are the only type that doesn't fit the new function yes, so it should simply stay in the old function, with the new one giving an error if you try to use it.
FRUSTUM_BOX can probably be rewritten to use a transformed bbox instead of an inverse transformed frustum.
* This is one of my major issues with irr: code is very rarely reviewed, even more rarely commented on, and most rarely merged. I have over three years old patches that haven't gotten a single comment.
Occlusion queries are the only type that doesn't fit the new function yes, so it should simply stay in the old function, with the new one giving an error if you try to use it.
FRUSTUM_BOX can probably be rewritten to use a transformed bbox instead of an inverse transformed frustum.
* This is one of my major issues with irr: code is very rarely reviewed, even more rarely commented on, and most rarely merged. I have over three years old patches that haven't gotten a single comment.
Re: Extending the isCulled interface
Ok, sorry about the patches. I've been in that situation once myself which was pretty much the reason I asked about getting into the core team at some point (if you want to do that then please discuss it with Hybrid when he's back from his holiday in 1-2 weeks). Though I've the feeling I've managed to get even less of my patches into Irrlicht since then, as it suddenly meant most of my time was spend on hunting bugs and problems of other people ;-)
Anyway - when changing the interface it probably makes sense adding the camera as parameter as well (and using the old one when NULL is passed).
Anyway - when changing the interface it probably makes sense adding the camera as parameter as well (and using the old one when NULL is passed).
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
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: Extending the isCulled interface
The culling patch is on my todo list, I already added the helper patches for it. This one will also go into the next release. Some others have not yet even be reviewed at all, sorry for that. But for about a year now my real life takes already day and night, so not much more possible right now.