Skip to main content Link Search Menu Expand Document (external link)

@floor attribute

🔌dp.kinect dp.kinect2
signature
floor X_FLOAT Y_FLOAT Z_FLOAT I_FLOAT J_FLOAT K_FLOAT
values
0. 0. 0. 0. 0. 0. default
examples
floor 0.0 -925.7 0.0 0.12 0.97 0.047

Floor plane as x, y, z coordinates for a point on the plane and i, j, k of a vector normal to the plane. Read only.

Floor plane identification occurs when @skeleton is enabled and values stabilize. Floor values are affected by @flipx and @distmeter. Enable @flooronbang or @floorout to output floor messages on every bang.

The @floor attribute can be queried using the standard Max mechanism of prepending “get” to the attribute name, getfloor, and sending that message to the plugin’s 1st inlet. @floor values will be output from the dumpout outlet.

Example

Render an OpenGL plane that visually matches the physical floor identified.

  1. Create a Max patch that includes your sensor plugin, jit.anim.node, and a jit.gl.gridshape @shape plane that renders itself to a window.
  2. Connect the node to the gridshape.
  3. Set the @position of the node to be the floor x, y, z values.
  4. Set the @direction of the node to be the floor i, j, k values.

Kinect v1 and v2 SDK floor equation

dp.kinect and dp.kinect2 use Microsoft Kinect SDKs that internally describe their floor clipping plane as an equation. When you need that SDK equation, use the @floor values to populate their coefficients.

Ax + By + Cz + D = 0
A = i value of the floor normal vector; negate when @flipx is enabled 
B = j value of the floor normal vector 
C = k value of the floor normal vector 
D = -y value of the floor point on the plane; in meters or mm by `@distmeter`