[Plib-users] Vector intersection testing
Brought to you by:
sjbaker
From: Karl M. H. <Kar...@gm...> - 2003-12-31 11:29:20
|
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 |