Packagecom.as3nui.nativeExtensions.air.kinect
Classpublic class Kinect
InheritanceKinect Inheritance flash.events.EventDispatcher
Subclasses MSKinect, OpenNIKinect

The Kinect class allows you to access skeleton tracking device hardware in your AIR applications.

An instance of this class will give you access to the different video streams and skeleton information of a Kinect sensor.



Public Properties
 PropertyDefined By
  cameraElevationAngle : int
Gets the current angle of the Device.
Kinect
  capabilities : DeviceCapabilities
[read-only] Get the capabilities of the Device.
Kinect
  nr : uint
[read-only] Get the index / nr of the Device.
Kinect
  settings : KinectSettings
[read-only]
Kinect
  state : String
[read-only] Get the current state of the Device.
Kinect
  users : Vector.<User>
[read-only] Get a list of all users
Kinect
  usersWithSkeleton : Vector.<User>
[read-only] Get a list of the users with a tracked skeleton
Kinect
Public Methods
 MethodDefined By
  
chooseSkeletons(trackingIds:Vector.<uint>):void
Only track the skeletons of the given trackingIds
Kinect
  
dispose():void
Cleanup the Device instance.
Kinect
  
getDevice(nr:uint = 0):Kinect
[static] Automatically chooses from the "default" devices for an operating system this is currently OpenNI for OSX and MSSDK / OpenNI for windows (depending on the ane)
Kinect
  
getDeviceByClass(deviceClass:Class, nr:uint = 0):Kinect
[static] Get an instance of the Kinect class.
Kinect
  
getDeviceByFramework(framework:String, nr:uint = 0):Kinect
[static] Get an instance of the Kinect class.
Kinect
  
isSupported():Boolean
[static] Check if there is a Sensor available for use
Kinect
  
numDevices():uint
[static] Get the current number of sensors connected to the system
Kinect
  
setChooseSkeletonsEnabled(value:Boolean):void
Change the skeleton chosing mode while the device is running
Kinect
  
setDepthMirror(value:Boolean):void
Change the depth image mirroring while the device is running
Kinect
  
setNearModeEnabled(value:Boolean):void
Change the near mode while the device is running
Kinect
  
setPointCloudDensity(value:uint):void
Change the density of the point cloud while the device is running.
Kinect
  
setPointCloudIncludeRGB(value:Boolean):void
Change the inclusion of RGB data in the point cloud while the device is running
Kinect
  
setPointCloudMirror(value:Boolean):void
Change the point cloud mirroring while the device is running
Kinect
  
setRGBMirror(value:Boolean):void
Change the rgb image mirroring while the device is running
Kinect
  
setSeatedSkeletonEnabled(value:Boolean):void
Change the seated skeleton mode while the device is running
Kinect
  
setSkeletonMirror(value:Boolean):void
Change the skeleton mirroring while the device is running
Kinect
  
setUserMaskMirror(value:Boolean):void
Change the user mask mirroring while the device is running
Kinect
  
start(deviceSettings:Object):void
Starts the kinect sensor, with the given configuration.
Kinect
  
stop():void
Stops the Device.
Kinect
Protected Methods
 MethodDefined By
  
Kinect
Events
 Event Summary Defined By
  Dispatched when the depth bitmapdata is updated.Kinect
  Dispatched when new point cloud information is available.Kinect
  Dispatched when the rgb bitmapdata is updated.Kinect
  Dispatched when the device has started.Kinect
  Dispatched when the device stops.Kinect
  Dispatched when new user(s) enter the scene.Kinect
  Dispatched when user mask bitmap(s) are updated.Kinect
  Dispatched when user(s) leave the scene.Kinect
  Dispatched when user(s) coordinates are updated.Kinect
  Dispatched when new user skeleton(s) are detected.Kinect
  Dispatched when user(s) with a skeleton leave the scene.Kinect
Property Detail
cameraElevationAngleproperty
cameraElevationAngle:int

Gets the current angle of the Device. Not all devices / drivers support this option. Check capabilities.hasCameraElevationSupport


Implementation
    public function get cameraElevationAngle():int
    public function set cameraElevationAngle(value:int):void
capabilitiesproperty 
capabilities:DeviceCapabilities  [read-only]

Get the capabilities of the Device.


Implementation
    public function get capabilities():DeviceCapabilities
nrproperty 
nr:uint  [read-only]

Get the index / nr of the Device.


Implementation
    public function get nr():uint
settingsproperty 
settings:KinectSettings  [read-only]


Implementation
    public function get settings():KinectSettings
stateproperty 
state:String  [read-only]

Get the current state of the Device.

Possible options are DeviceState.STARTED, DeviceState.STOPPED, DeviceState.STARTING.


Implementation
    public function get state():String

See also

usersproperty 
users:Vector.<User>  [read-only]

Get a list of all users


Implementation
    public function get users():Vector.<User>
usersWithSkeletonproperty 
usersWithSkeleton:Vector.<User>  [read-only]

Get a list of the users with a tracked skeleton


Implementation
    public function get usersWithSkeleton():Vector.<User>
Method Detail
chooseSkeletons()method
public function chooseSkeletons(trackingIds:Vector.<uint>):void

Only track the skeletons of the given trackingIds

Parameters

trackingIds:Vector.<uint>

createContextBridge()method 
protected function createContextBridge():void

dispose()method 
public function dispose():void

Cleanup the Device instance.

getDevice()method 
public static function getDevice(nr:uint = 0):Kinect

Automatically chooses from the "default" devices for an operating system this is currently OpenNI for OSX and MSSDK / OpenNI for windows (depending on the ane)

Parameters

nr:uint (default = 0) — Device number to get

Returns
Kinect
getDeviceByClass()method 
public static function getDeviceByClass(deviceClass:Class, nr:uint = 0):Kinect

Get an instance of the Kinect class. You'll use this method to get instances of the class, instead of creating instances yourself.

Parameters

deviceClass:Class
 
nr:uint (default = 0)

Returns
Kinect
getDeviceByFramework()method 
public static function getDeviceByFramework(framework:String, nr:uint = 0):Kinect

Get an instance of the Kinect class. You'll use this method to get instances of the class, instead of creating instances yourself.

Parameters

framework:String
 
nr:uint (default = 0) — DeviceId to get

Returns
Kinect

See also

isSupported()method 
public static function isSupported():Boolean

Check if there is a Sensor available for use

Returns
Boolean
numDevices()method 
public static function numDevices():uint

Get the current number of sensors connected to the system

Returns
uint — Number of Sensors connected
setChooseSkeletonsEnabled()method 
public function setChooseSkeletonsEnabled(value:Boolean):void

Change the skeleton chosing mode while the device is running

Parameters

value:Boolean

setDepthMirror()method 
public function setDepthMirror(value:Boolean):void

Change the depth image mirroring while the device is running

Parameters

value:Boolean

setNearModeEnabled()method 
public function setNearModeEnabled(value:Boolean):void

Change the near mode while the device is running

Parameters

value:Boolean

setPointCloudDensity()method 
public function setPointCloudDensity(value:uint):void

Change the density of the point cloud while the device is running.

Parameters

value:uint

setPointCloudIncludeRGB()method 
public function setPointCloudIncludeRGB(value:Boolean):void

Change the inclusion of RGB data in the point cloud while the device is running

Parameters

value:Boolean

setPointCloudMirror()method 
public function setPointCloudMirror(value:Boolean):void

Change the point cloud mirroring while the device is running

Parameters

value:Boolean

setRGBMirror()method 
public function setRGBMirror(value:Boolean):void

Change the rgb image mirroring while the device is running

Parameters

value:Boolean

setSeatedSkeletonEnabled()method 
public function setSeatedSkeletonEnabled(value:Boolean):void

Change the seated skeleton mode while the device is running

Parameters

value:Boolean

setSkeletonMirror()method 
public function setSkeletonMirror(value:Boolean):void

Change the skeleton mirroring while the device is running

Parameters

value:Boolean

setUserMaskMirror()method 
public function setUserMaskMirror(value:Boolean):void

Change the user mask mirroring while the device is running

Parameters

value:Boolean

start()method 
public function start(deviceSettings:Object):void

Starts the kinect sensor, with the given configuration.

Parameters

deviceSettings:Object

See also

stop()method 
public function stop():void

Stops the Device.

Event Detail
depthImageUpdate Event
Event Object Type: com.as3nui.nativeExtensions.air.kinect.events.CameraImageEvent

Dispatched when the depth bitmapdata is updated.

pointCloudUpdate Event  
Event Object Type: com.as3nui.nativeExtensions.air.kinect.events.PointCloudEvent

Dispatched when new point cloud information is available.

rgbImageUpdate Event  
Event Object Type: com.as3nui.nativeExtensions.air.kinect.events.CameraImageEvent

Dispatched when the rgb bitmapdata is updated.

started Event  
Event Object Type: com.as3nui.nativeExtensions.air.kinect.events.DeviceEvent

Dispatched when the device has started. Depending on your drivers (MSSDK / OpenNI) this can take a while.

stopped Event  
Event Object Type: com.as3nui.nativeExtensions.air.kinect.events.DeviceEvent

Dispatched when the device stops. This can happen when you unplug the device from the computer.

usersAdded Event  
Event Object Type: com.as3nui.nativeExtensions.air.kinect.events.UserEvent

Dispatched when new user(s) enter the scene.

usersMaskImageUpdate Event  
Event Object Type: com.as3nui.nativeExtensions.air.kinect.events.UserEvent

Dispatched when user mask bitmap(s) are updated.

usersRemoved Event  
Event Object Type: com.as3nui.nativeExtensions.air.kinect.events.UserEvent

Dispatched when user(s) leave the scene.

usersUpdated Event  
Event Object Type: com.as3nui.nativeExtensions.air.kinect.events.UserEvent

Dispatched when user(s) coordinates are updated.

usersWithSkeletonAdded Event  
Event Object Type: com.as3nui.nativeExtensions.air.kinect.events.UserEvent

Dispatched when new user skeleton(s) are detected.

usersWithSkeletonRemoved Event  
Event Object Type: com.as3nui.nativeExtensions.air.kinect.events.UserEvent

Dispatched when user(s) with a skeleton leave the scene.