Holiday notice: Cycling '74 will be closed Monday, October 9th. Manual authorization, support cases, and manual order processing will be delayed.

Apr 19 2013 | 9:29 am

Hello everybody,

I'm trying to learn jit.openni for user tracking with the Kinect.
As for now, I'd like to understand how I can draw a plane representing the floor.
As reported in https://github.com/diablodale/jit.openni/wiki

scene_floor is an array of 6 floats: first 3 are the X, Y, Z coordinates for a point on the plane, the second 3 are the X, Y, Z of a normal vector.

Next step: https://en.wikipedia.org/wiki/Plane_%28geometry%29#Definition_with_a_point_and_a_normal_vector

Definition with a point and a normal vector

In a three-dimensional space, another important way of defining a plane is by specifying a point and a normal vector to the plane.

Let r0 be the position vector of some known point P_0 in the plane, and let n be a nonzero vector normal to the plane. The idea is that a point P with position vector r is in the plane if and only if the vector drawn from P_0 to P is perpendicular to n. Recalling that two vectors are perpendicular if and only if their dot product is zero, it follows that the desired plane can be expressed as the set of all points r such that

bold n cdot (bold r-bold r_0)=0.

(The dot here means a dot product, not scalar multiplication.) Expanded this becomes

n_x (x-x_0)+ n_y(y-y_0)+ n_z(z-z_0)=0,,

which is the familiar equation for a plane.[3]

Note that this means that two non-equal points can be used to define a plane so long as they are ordered and used according to an agreed convention: for example, the first point P_0 sits on the plane and the normal vector is defined implicitly from (P_1 - P_0).

Ok, now my ignorance does the rest...how can I translate all this beautiful things in the Jitter world? (i. e. a matrix controlling a jit.gl.mesh)?