com.primesense.nite
Class UserData

java.lang.Object
  extended by com.primesense.nite.UserData

public class UserData
extends java.lang.Object

Provides the current information available about a specific user detected by the UserTracker.
Note that some data is provided in depth ("projective") coordinates, and other data is provided in world ("real world") coordinates. See the OpenNI 2.0 documentation for information on the two coordinate systems used and how to convert between them.

See Also:
UserTracker, Skeleton, UserMap

Method Summary
 BoundingBox getBoundingBox()
          Get a bounding box around the user.
 Point3D<java.lang.Float> getCenterOfMass()
          Find the geometric center of mass of the user.
 short getId()
          Get the ID of the user.
 PoseData[] getPoses()
          Get all information about a specific pose for this user.
 PoseData getPoses(PoseType type)
          Get all information about a specific pose for this user.
 Skeleton getSkeleton()
          Get the full skeleton of this user.
 boolean isLost()
          Check if the user is lost.
 boolean isNew()
          Checks whether this user has been newly detected.
 boolean isVisible()
          Check if the user is currently visible in the field of view.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getId

public short getId()
Get the ID of the user. This ID is persistent -- it will not change as long as the user is being continuously tracked.

Returns:
UserId of the user being tracked.

getBoundingBox

public BoundingBox getBoundingBox()
Get a bounding box around the user. This provides a minimum volume cube that completely contains the user. Coordinates are "projective", so they are suitable for direct use with a depthmap.

Returns:
BoundingBox that surrounds the user in the UserMap.

getCenterOfMass

public Point3D<java.lang.Float> getCenterOfMass()
Find the geometric center of mass of the user. This value is given in "real world" coordinates, so it must be converted before being superimposed over a raw depthmap. It is suitable for direct use with skeleton and hand point output.

Returns:
Point3D indicating position in space of the user.

isNew

public boolean isNew()
Checks whether this user has been newly detected.

Returns:
True if this is the first frame this user appears in, False otherwise.

isVisible

public boolean isVisible()
Check if the user is currently visible in the field of view.

Returns:
True if the user is visible and detected, false otherwise.

isLost

public boolean isLost()
Check if the user is lost. This will happen once, in the first frame in which the user was declared lost. This user will not be provided in future frames, and his UserId may be assigned to a new user that appears in view.

Returns:
True if the user is no longer being tracked, False otherwise.

getSkeleton

public Skeleton getSkeleton()
Get the full skeleton of this user. This will only be available if Skeleton tracking has been enabled for this user, and the skeleton is calibrated and being actively tracked.

Returns:
Skeleton of the user.
See Also:
UserTracker

getPoses

public PoseData[] getPoses()
Get all information about a specific pose for this user. This will only be available if pose detection is enabled on this user for the PoseType specified.

Returns:
Array of PoseData values.

getPoses

public PoseData getPoses(PoseType type)
Get all information about a specific pose for this user. This will only be available if pose detection is enabled on this user for the PoseType specified.

Returns:
PoseData for this user.