SViewFrustum functions

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
slavik262
Posts: 753
Joined: Sun Nov 22, 2009 9:25 pm
Location: Wisconsin, USA

SViewFrustum functions

Post by slavik262 »

SViewFrustum has functions such as getFarLeftUp, getFarLeftDown, etc.

Why doesn't it contain corresponding functions for the near clip plane, such as getNearLeftUp, getNearLeftDown, etc.?

I'm writing them in myself at the moment (I need them for some shader work I'm doing), but it would be nice not to have to copy the code into the file every time I download a new version of Irrlicht. Could these be put in? It's a simple 5 minute job.
slavik262
Posts: 753
Joined: Sun Nov 22, 2009 9:25 pm
Location: Wisconsin, USA

Post by slavik262 »

Devs? On a related note, how would one submit patches to Irrlicht?
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

I suppose adding those would make sense, but then again I don't know why they didn't get added together with the others already. I guess Hybrid knows more about that class (he's in holiday right now, will be back soon).

Please post patches on the patch-tracker:
http://sourceforge.net/tracker/?group_i ... tid=540678
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
REDDemon
Developer
Posts: 1044
Joined: Tue Aug 31, 2010 8:06 pm
Location: Genova (Italy)

Post by REDDemon »

what about implementing a debug frustum view??

i mean

1) set up the standard view and rendering nodes wich are in it. (so any application that ask for the frustum view such an octree manager will get data about frustum that are not the same)

2) fly over the frustum with the activedebug camera and see if everything is culled correctly.

so the used frustum is not the same of the activedebug camera frustum.

something like:

Code: Select all

getFrustumView(

#ifdef _DEBUG
bool debug
#endif 

)
{
#ifdef _DEBUG
if(debug)
    return debugfrustum;
#endif
return frustum;
}
:) strange idea but someone may find it nice xD
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Post by Mel »

Implementing those functions is actually pretty easy and straight, SViewFrustum has the 6 planes defined, so you have to test intersections between the side and NEAR planes to get the corresponding points close to the camera point. That is how it is done to get the far planes. I have made use of those sometimes, so it would be a nice addition. For the some LiSPSM algorithms those points are needed, they provide more accurate results than using just the camera point.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

I don't know why they don't exist, but adding them for 1.8 won't hurt for sure.
Post Reply