C# Class KUInterface, KinectSDK-Unity3D_Interface_Plugin

class for accessing Kinect methods
Inheritance: MonoBehaviour
ファイルを表示 Open project: adevine1618/KinectSDK-Unity3D_Interface_Plugin Class Usage Examples

Public Properties

Property Type Description
displayDepthImage bool
displayJointInformation bool
displayTextureImage bool
scaleFactor int
twoPlayer bool
useDepth bool
useRGB bool

Public Methods

Method Description
GetCameraAngle ( ) : float

returns current Kinect camera angle from horizontal

GetDepthData ( ) : short[][]

gets depth data from Kinect depth camera

depth[x=0][y=0] corresponds to top-left corner of image

GetJointPos ( KinectWrapper, joint ) : Vector3

one-player overload of joint position get function

GetJointPos ( int player, KinectWrapper, joint ) : Vector3

main joint position get function

GetTextureImage ( ) : Texture2D

gets color texture image from Kinect RGB camera

SetCameraAngle ( int angle ) : bool

sets Kinect camera angle

do not change angle more than once every 30 sec

Private Methods

Method Description
DisplayPlayerData ( int player, int place ) : void
OnApplicationQuit ( ) : void
OnGUI ( ) : void
Start ( ) : void
Update ( ) : void
UpdateDepth ( ) : void
UpdateTextureImage ( ) : void

Method Details

GetCameraAngle() public method

returns current Kinect camera angle from horizontal
public GetCameraAngle ( ) : float
return float

GetDepthData() public method

gets depth data from Kinect depth camera
depth[x=0][y=0] corresponds to top-left corner of image
public GetDepthData ( ) : short[][]
return short[][]

GetJointPos() public method

one-player overload of joint position get function
public GetJointPos ( KinectWrapper, joint ) : Vector3
joint KinectWrapper, KinectWrapper.Joints enum
return Vector3

GetJointPos() public method

main joint position get function
public GetJointPos ( int player, KinectWrapper, joint ) : Vector3
player int player number (1,2)
joint KinectWrapper, KinectWrapper.Joints enum
return Vector3

GetTextureImage() public method

gets color texture image from Kinect RGB camera
public GetTextureImage ( ) : Texture2D
return UnityEngine.Texture2D

SetCameraAngle() public method

sets Kinect camera angle
do not change angle more than once every 30 sec
public SetCameraAngle ( int angle ) : bool
angle int range: -27 -> 27
return bool

Property Details

displayDepthImage public_oe property

displays depth image on screen
public bool displayDepthImage
return bool

displayJointInformation public_oe property

displays joint position data on screen
public bool displayJointInformation
return bool

displayTextureImage public_oe property

displays RGB texture image on screen
public bool displayTextureImage
return bool

scaleFactor public_oe property

scales all joint positions by given amount. Do not set to zero.
public int scaleFactor
return int

twoPlayer public_oe property

set to true to track two skeletons
public bool twoPlayer
return bool

useDepth public_oe property

set to false to optimize performance if depth camera is not being used
public bool useDepth
return bool

useRGB public_oe property

set to false to optimize performance if RGB camera is not being used
public bool useRGB
return bool