View Single Post
  #1  
Old 05-08-2012, 08:29 AM
victorqx victorqx is offline
Member
 
Join Date: Apr 2012
Posts: 15
viz.plane() intersect function parameters

Hi all,

A quick question that has me stumped for the entire afternoon. I'm using a Kinect for head tracking and am experimenting with gesture control for moving about. I have a small CAVE (3mx3m) defined where the Kinect is at point (0, 1.6, 2).

I want to find out where a user is pointing to, so that I can move the caveorigin towards that point. My idea was to draw a line from a users hand along the direction of their underarm (using the LEFTHAND and LEFTELBOW markers from the Kinect to get the direction) and find out where it intersects with the x,y plane on z=2.

So, I create a plane(), call setNormal([0, 0, -1]) and setPos([0, 0, 2]). Then I wanted to call the .intersect() method, but that doesn't seem to give me the results I'm looking for. The error message mentions that I need to supply 6 parameters. I've tried supplying [x1,y1,z1,x2,y2,z2] (in various combinations) and [x1,y1,z1,x2-x1,y2-y1,z2-z1] (in various combinations), but the resulting intersection point don't seem to have anything to do with the position of my arm.

Could anyone give me the precise parameters I would have to enter for the .intersect() method of a Plane()? Unfortunately the function specification only mentions 'line' and the actual implementation is in a .dll, so not that easy to get to.

Thanks!

Victor
Reply With Quote