Re: [Plib-users] Vector intersection testing
Brought to you by:
sjbaker
From: Karl M. H. <Kar...@gm...> - 2004-01-12 18:36:58
|
It's me again. I think I sent this to the wrong list first, moving it to plib-devel now. Since nobody answered to my problem, if had to solve it myself :-) I solve my problem using gluUnproject and ssgLOS with some matrix transformations first. The result is a function getScreenIsect (int x, int y) ; which returns a list of ssgLOS hit results. I'm not a very professional programmer, so the code is probably ugly and slow, but if anyone wants it, just contact me. I still think this should be a plib core feature, and would be happy to commit my function to plib (someone should have a look at it first, though). Karl Moritz On Wednesday 31 December 2003 11:29 am, Karl Moritz Hermann wrote: > Hello, > > I'm new to this list, sorry if I repeat anything. I was searching > the sourceforge archive on this topic, and found one thread, but > the matter wasn't resolved in there. > > I'm using the mouse routine to start some pathfinding algorithm, > and need to find out, which point on the ssgRoot the mouse points > to. > To do this, I would need to intersect a vector (direction of campos, > starting at mouse coordinates) with the scene. > I tried using ssgLOS, but looking in the sourcecode of plib, it seems > that ssgLOS is only intersecting a vector (0,0,0) + x (s), and I don't > see how to intersect a vector not starting at (0,0,0). > > Are there any solutions for this problem in plib (I'm using the CVS > version), or do I need to write a function for that from scratch? > I think such a vector intersection function would be quite useful for many > applications (Basically for all applications using the mouse for more than > clicking on buttons or stirring some vehicle). I'd be happy to implement > such a function into ssg if there isn't already some functionality covering > that problem. > > A happy new year, > > Karl Moritz > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IBM Linux Tutorials. > Become an expert in LINUX or just sharpen your skills. Sign up for IBM's > Free Linux Tutorials. Learn everything from the bash shell to sys admin. > Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click > _______________________________________________ > plib-users mailing list > pli...@li... > https://lists.sourceforge.net/lists/listinfo/plib-users |