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.
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.
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.
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)?