|
Kinect-v2 Unity Examples - KinectScripts
2.20.0
|
KinectManager is the main and the most basic Kinect-related component. It is used to control the sensor and poll the data streams. More...
Public Member Functions | |
| bool | IsInitialized () |
| Determines if the sensor and KinectManager-component are initialized and ready to use. More... | |
| KinectInterop.DepthSensorPlatform | GetSensorPlatform () |
| Gets the selected depth-sensor platform. More... | |
| int | GetBodyCount () |
| Gets the number of bodies, tracked by the sensor. More... | |
| int | GetJointCount () |
| Gets the the number of body joints, tracked by the sensor. More... | |
| KinectInterop.JointType | GetParentJoint (KinectInterop.JointType joint) |
| Gets the parent joint of the given joint. More... | |
| KinectInterop.JointType | GetNextJoint (KinectInterop.JointType joint) |
| Gets the next joint of the given joint. More... | |
| int | GetColorImageWidth () |
| Gets the width of the color image, returned by the sensor. More... | |
| int | GetColorImageHeight () |
| Gets the height of the color image, returned by the sensor. More... | |
| Vector3 | GetColorImageScale () |
| Gets the color image scale. More... | |
| Vector3 | GetDepthImageScale () |
| Gets the depth image scale. More... | |
| long | GetColorFrameTime () |
| Gets the last color frame time, as returned by the sensor. More... | |
| long | GetDepthFrameTime () |
| Gets the last depth frame time, as returned by the sensor. More... | |
| int | GetDepthImageWidth () |
| Gets the width of the depth image, returned by the sensor. More... | |
| int | GetDepthImageHeight () |
| Gets the height of the depth image, returned by the sensor. More... | |
| byte [] | GetRawBodyIndexMap () |
| Gets the raw body index data, if ComputeUserMap is true. More... | |
| ushort [] | GetRawDepthMap () |
| Gets the raw depth data, if ComputeUserMap is true. More... | |
| ushort [] | GetRawInfraredMap () |
| Gets the raw infrared data, if ComputeInfraredMap is true. More... | |
| Texture | GetUsersLblTex () |
| Gets the users texture, if ComputeUserMap is true More... | |
| Texture2D | GetUsersLblTex2D () |
| Gets the users 2d-texture, if ComputeUserMap is true More... | |
| Texture | GetUsersClrTex () |
| Gets the color image texture,if ComputeColorMap is true More... | |
| Texture2D | GetUsersClrTex2D () |
| Gets the color image 2d-texture,if ComputeColorMap is true More... | |
| bool | IsUserDetected () |
| Determines whether at least one user is currently detected by the sensor More... | |
| bool | IsUserDetected (int i) |
| Determines whether the user with the specified index is currently detected by the sensor More... | |
| bool | IsUserTracked (Int64 userId) |
| Determines whether the user with the specified userId is in the list of tracked users or not. More... | |
| int | GetUsersCount () |
| Gets the number of currently tracked users. More... | |
| List< long > | GetAllUserIds () |
| Gets the IDs of all currently tracked users. More... | |
| int | GetMaxUserIndex () |
| Gets the max player-index of the currently tracked users. More... | |
| List< int > | GetAllUserIndices () |
| Gets the player indices of all currently tracked users. More... | |
| Int64 | GetUserIdByIndex (int i) |
| Gets the user ID by the specified user index. More... | |
| int | GetUserIndexById (Int64 userId) |
| Gets the user index by the specified user ID. More... | |
| int | GetBodyIndexByUserId (Int64 userId) |
| Gets the body index by the specified user ID, or -1 if the user ID does not exist. More... | |
| List< int > | GetTrackedBodyIndices () |
| Gets the list of tracked body indices. More... | |
| bool | IsTrackedUsersLimited () |
| Determines whether the tracked users are limited by their number or distance or not. More... | |
| Int64 | GetPrimaryUserID () |
| Gets the UserID of the primary user (the first or the closest one), or 0 if no user is detected. More... | |
| bool | SetPrimaryUserID (Int64 userId) |
| Sets the primary user ID, in order to change the active user. More... | |
| int | GetDisplayedBodyIndex () |
| Gets the body index [0-5], if there is single body selected to be displayed on the user map, or -1 if all bodies are displayed. More... | |
| bool | SetDisplayedBodyIndex (int iBodyIndex) |
| Sets the body index [0-5], if a single body must be displayed on the user map, or -1 if all bodies must be displayed. More... | |
| long | GetBodyFrameTimestamp () |
| Gets the last body frame timestamp. More... | |
| Matrix4x4 | GetKinectToWorldMatrix () |
| Gets the kinect to world matrix. More... | |
| void | UpdateKinectToWorldMatrix () |
| Updates the kinect to world transform matrix, according to the current values of SensorHeight, SensorAngle and FlipLeftRight. More... | |
| void | SetKinectToWorldMatrix (Vector3 sensorPos, Quaternion sensorRot, Vector3 sensorScale) |
| Sets the kinect to world matrix. More... | |
| Vector3 | GetUserKinectPosition (Int64 userId) |
| Gets the user position in Kinect coordinate system, in meters. More... | |
| Vector3 | GetUserPosition (Int64 userId) |
| Gets the user position, relative to the sensor, in meters. More... | |
| Quaternion | GetUserOrientation (Int64 userId, bool flip) |
| Gets the user orientation. More... | |
| KinectInterop.TrackingState | GetJointTrackingState (Int64 userId, int joint) |
| Gets the tracking state of the joint. More... | |
| bool | IsJointTracked (Int64 userId, int joint) |
| Determines whether the given joint of the specified user is being tracked. More... | |
| Vector3 | GetJointKinectPosition (Int64 userId, int joint) |
| Gets the joint position of the specified user, in Kinect coordinate system, in meters. More... | |
| Vector3 | GetJointPosition (Int64 userId, int joint) |
| Gets the joint position of the specified user, in meters. More... | |
| Vector3 | GetJointPositionFlipX (Int64 userId, int joint) |
| Gets the joint position of the specified user with flipped x-coordinate, in meters. More... | |
| Vector3 | GetJointVelocity (Int64 userId, int joint) |
| Gets the joint velocity for the specified user and joint, in meters/s. More... | |
| Vector3 | GetJointDirection (Int64 userId, int joint, bool flipX, bool flipZ) |
| Gets the joint direction of the specified user, relative to its parent joint. More... | |
| Vector3 | GetDirectionBetweenJoints (Int64 userId, int firstJoint, int secondJoint, bool flipX, bool flipZ) |
| Gets the direction between the given joints of the specified user. More... | |
| Quaternion | GetJointOrientation (Int64 userId, int joint, bool flip) |
| Gets the joint orientation of the specified user. More... | |
| float | GetAngleAtJoint (Int64 userId, int joint) |
| Gets the angle between bones at the given joint. More... | |
| Vector3 | GetJointPosDepthOverlay (Int64 userId, int joint, Camera camera, Rect imageRect) |
| Gets the 3d overlay position of the given joint over the depth-image. More... | |
| Vector3 | GetJointPosColorOverlay (Int64 userId, int joint, Camera camera, Rect imageRect) |
| Gets the 3d overlay position of the given joint over the color-image. More... | |
| Vector2 | GetJointPosColorOverlay (Int64 userId, int joint, Rect imageRect) |
| Gets the 2d overlay position of the given joint over the given image. More... | |
| Vector2 | GetJointDepthMapPos (Int64 userId, int joint) |
| Gets the joint position on the depth map texture. More... | |
| Vector2 | GetJointColorMapPos (Int64 userId, int joint) |
| Gets the joint position on the color map texture. More... | |
| bool | IsUserTurnedAround (Int64 userId) |
| Determines whether the given user is turned around or not. More... | |
| bool | IsLeftHandConfidenceHigh (Int64 userId) |
| Determines whether the left hand confidence is high for the specified user. More... | |
| bool | IsRightHandConfidenceHigh (Int64 userId) |
| Determines whether the right hand confidence is high for the specified user. More... | |
| KinectInterop.HandState | GetLeftHandState (Int64 userId) |
| Gets the left hand state for the specified user. More... | |
| KinectInterop.HandState | GetRightHandState (Int64 userId) |
| Gets the right hand state for the specified user. More... | |
| bool | GetLeftHandInteractionBox (Int64 userId, ref Vector3 leftBotBack, ref Vector3 rightTopFront, bool bValidBox) |
| Gets the left hand interaction box for the specified user. More... | |
| bool | GetRightHandInteractionBox (Int64 userId, ref Vector3 leftBotBack, ref Vector3 rightTopFront, bool bValidBox) |
| Gets the right hand interaction box for the specified user. More... | |
| Rect | GetForegroundRectDepth (Camera foregroundCamera) |
| Gets the foreground rectangle of the depth image. More... | |
| Rect | GetForegroundRectColor (Camera foregroundCamera) |
| Gets the foreground rectangle of the color image.. More... | |
| Vector3 | GetPosDepthOverlay (int dx, int dy, ushort depth, Camera camera, Rect imageRect) |
| Gets the 3d overlay position of a point over the depth-image. More... | |
| ushort | GetDepthForPixel (int x, int y) |
| Gets the depth value for the specified pixel, if ComputeUserMap is true. More... | |
| ushort | GetDepthForIndex (int index) |
| Gets the depth value for the specified pixel, if ComputeUserMap is true. More... | |
| Vector3 | MapDepthPointToSpaceCoords (Vector2 posPoint, ushort depthValue, bool bWorldCoords) |
| Returns the space coordinates of a depth-map point, or Vector3.zero if the sensor is not initialized More... | |
| bool | MapDepthFrameToSpaceCoords (ref Vector3[] avSpaceCoords) |
| Maps the depth frame to space coordinates. More... | |
| Vector2 | MapSpacePointToDepthCoords (Vector3 posPoint) |
| Returns the depth-map coordinates of a space point, or Vector2.zero if Kinect is not initialized More... | |
| Vector2 | MapDepthPointToColorCoords (Vector2 posPoint, ushort depthValue) |
| Returns the color-map coordinates of a depth point. More... | |
| bool | MapDepthFrameToColorCoords (ref Vector2[] avColorCoords) |
| Maps the depth frame to color coordinates. More... | |
| bool | MapColorFrameToDepthCoords (ref Vector2[] avDepthCoords) |
| Maps the color frame to depth coordinates. More... | |
| Vector2 | MapColorPointToDepthCoords (Vector2 colorPos, bool bReadDepthCoordsIfNeeded) |
| Returns the depth-map coordinates of a color point. More... | |
| void | ClearKinectUsers () |
| Removes all currently detected users, allowing new user-detection process to start. More... | |
| void | ResetFilters () |
| Resets the Kinect data filters. More... | |
| void | DetectGesture (Int64 UserId, KinectGestures.Gestures gesture) |
| Adds a gesture to the list of detected gestures for the specified user. More... | |
| bool | ResetGesture (Int64 UserId, KinectGestures.Gestures gesture) |
| Resets the gesture state for the given gesture of the specified user. More... | |
| void | ResetPlayerGestures (Int64 UserId) |
| Resets the gesture states for all gestures of the specified user. More... | |
| bool | DeleteGesture (Int64 UserId, KinectGestures.Gestures gesture) |
| Deletes the gesture for the specified user. More... | |
| void | ClearGestures (Int64 UserId) |
| Deletes all gestures for the specified user. More... | |
| List< KinectGestures.Gestures > | GetGesturesList (Int64 UserId) |
| Gets the list of gestures for the specified user. More... | |
| int | GetGesturesCount (Int64 UserId) |
| Gets the gestures count for the specified user. More... | |
| KinectGestures.Gestures | GetGestureAtIndex (Int64 UserId, int i) |
| Gets the gesture at the specified index for the given user. More... | |
| bool | IsTrackingGesture (Int64 UserId, KinectGestures.Gestures gesture) |
| Determines whether the given gesture is in the list of gestures for the specified user. More... | |
| bool | IsGestureComplete (Int64 UserId, KinectGestures.Gestures gesture, bool bResetOnComplete) |
| Determines whether the given gesture for the specified user is complete. More... | |
| bool | IsGestureCancelled (Int64 UserId, KinectGestures.Gestures gesture) |
| Determines whether the given gesture for the specified user is canceled. More... | |
| float | GetGestureProgress (Int64 UserId, KinectGestures.Gestures gesture) |
| Gets the progress (in range [0, 1]) of the given gesture for the specified user. More... | |
| Vector3 | GetGestureScreenPos (Int64 UserId, KinectGestures.Gestures gesture) |
| Gets the normalized screen position of the given gesture for the specified user. More... | |
| string | GetWorldMatrixData (char delimiter) |
| Gets the world matrix data as one csv line. More... | |
| string | GetBodyHandData (ref long liRelTime, char delimiter) |
| Gets the body hand as one csv line, or returns empty string if there is no new body frame. More... | |
| string | GetBodyFrameData (ref long liRelTime, ref float fUnityTime, char delimiter) |
| Gets the body frame as one csv line, or returns empty string if there is no new body frame. More... | |
| string | GetBodyFrameDataK4b (ref long liRelTime, ref float fUnityTime, char delimiter) |
| Gets the body frame as one csv line (k4b style), or returns empty string if there is no new body frame. More... | |
| bool | IsPlayModeEnabled () |
| Determines whether the play mode is enabled or not. More... | |
| void | EnablePlayMode (bool bEnabled) |
| Enables or displables the play mode. More... | |
| bool | SetWorldMatrixData (string sLine) |
| Sets the world matrix data from the given csv line. More... | |
| bool | SetBodyHandData (string sLine) |
| Sets the body hand data from the given csv line. More... | |
| bool | SetBodyFrameData (string sLine) |
| Sets the body frame from the given csv line. More... | |
| void | RenderUserImageTexture (long userId, RenderTexture texture) |
| virtual void | RearrangeUserIndices () |
| Rearranges the user indices, according to the current criteria More... | |
| void | RefreshAvatarUserIds () |
| Refreshs the userIds of all available avatar controllers, after new user appears in front of the sensor, or when some user gets lost. More... | |
| void | refreshGestureListeners () |
| Refreshs the gesture listeners' list. More... | |
| void | refreshAvatarControllers () |
| Refreshs the avatar controllers' list. More... | |
Static Public Member Functions | |
| static bool | IsKinectInitialized () |
| Determines if the sensor and KinectManager-component are initialized and ready to use. More... | |
Public Attributes | |
| float | sensorHeight = 1.0f |
| float | sensorAngle = 0f |
| AutoHeightAngle | autoHeightAngle = AutoHeightAngle.DontUse |
| UserMapType | computeUserMap = UserMapType.RawUserDepth |
| bool | computeColorMap = false |
| bool | computeInfraredMap = false |
| bool | displayUserMap = false |
| bool | displayColorMap = false |
| bool | displaySkeletonLines = false |
| float | DisplayMapsWidthPercent = 20f |
| bool | useMultiSourceReader = false |
| float | minUserDistance = 0.5f |
| float | maxUserDistance = 0f |
| float | maxLeftRightDistance = 0f |
| int | maxTrackedUsers = 6 |
| bool | showTrackedUsersOnly = true |
| UserDetectionOrder | userDetectionOrder = UserDetectionOrder.Appearance |
| bool | ignoreInferredJoints = false |
| bool | ignoreZCoordinates = false |
| bool | lateUpdateAvatars = false |
| bool | skipRemoteAvatars = false |
| Smoothing | smoothing = Smoothing.Default |
| bool | useBoneOrientationConstraints = false |
| bool | estimateJointVelocities = false |
| Smoothing | velocitySmoothing = Smoothing.Light |
| bool | allowTurnArounds = false |
| AllowedRotations | allowedHandRotations = AllowedRotations.Default |
| float | waitTimeBeforeRemove = 1f |
| List< AvatarController > | avatarControllers = new List<AvatarController>() |
| KinectGestures.Gestures | playerCalibrationPose |
| List< KinectGestures.Gestures > | playerCommonGestures = new List<KinectGestures.Gestures>() |
| float | minTimeBetweenGestures = 0.7f |
| KinectGestures | gestureManager |
| List< MonoBehaviour > | gestureListeners = new List<MonoBehaviour>() |
| UnityEngine.UI.Text | calibrationText |
| UnityEngine.UI.Text | gesturesDebugText |
Properties | |
| static KinectManager | Instance [get] |
| Gets the single KinectManager instance. More... | |
KinectManager is the main and the most basic Kinect-related component. It is used to control the sensor and poll the data streams.
| void KinectManager.ClearGestures | ( | Int64 | UserId | ) |
Deletes all gestures for the specified user.
| UserId | User ID |
| void KinectManager.ClearKinectUsers | ( | ) |
Removes all currently detected users, allowing new user-detection process to start.
| bool KinectManager.DeleteGesture | ( | Int64 | UserId, |
| KinectGestures.Gestures | gesture | ||
| ) |
Deletes the gesture for the specified user.
true, if gesture was deleted, false otherwise.| UserId | User ID |
| gesture | Gesture type |
| void KinectManager.DetectGesture | ( | Int64 | UserId, |
| KinectGestures.Gestures | gesture | ||
| ) |
Adds a gesture to the list of detected gestures for the specified user.
| UserId | User ID |
| gesture | Gesture type |
| void KinectManager.EnablePlayMode | ( | bool | bEnabled | ) |
Enables or displables the play mode.
| bEnabled | If set to true enables the play mode. |
| List<long> KinectManager.GetAllUserIds | ( | ) |
Gets the IDs of all currently tracked users.
| List<int> KinectManager.GetAllUserIndices | ( | ) |
Gets the player indices of all currently tracked users.
| float KinectManager.GetAngleAtJoint | ( | Int64 | userId, |
| int | joint | ||
| ) |
Gets the angle between bones at the given joint.
| userId | User ID |
| joint | Joint index |
| int KinectManager.GetBodyCount | ( | ) |
Gets the number of bodies, tracked by the sensor.
| string KinectManager.GetBodyFrameData | ( | ref long | liRelTime, |
| ref float | fUnityTime, | ||
| char | delimiter | ||
| ) |
Gets the body frame as one csv line, or returns empty string if there is no new body frame.
| liRelTime | Reference to variable, used to compare frame times. |
| fUnityTime | Reference to variable, used to save the current Unity time. |
| string KinectManager.GetBodyFrameDataK4b | ( | ref long | liRelTime, |
| ref float | fUnityTime, | ||
| char | delimiter | ||
| ) |
Gets the body frame as one csv line (k4b style), or returns empty string if there is no new body frame.
| liRelTime | Reference to variable, used to compare frame times. |
| fUnityTime | Reference to variable, used to save the current Unity time. |
| long KinectManager.GetBodyFrameTimestamp | ( | ) |
Gets the last body frame timestamp.
| string KinectManager.GetBodyHandData | ( | ref long | liRelTime, |
| char | delimiter | ||
| ) |
Gets the body hand as one csv line, or returns empty string if there is no new body frame.
| liRelTime | Reference to variable, used to compare frame times. |
| int KinectManager.GetBodyIndexByUserId | ( | Int64 | userId | ) |
Gets the body index by the specified user ID, or -1 if the user ID does not exist.
| userId | User ID |
| long KinectManager.GetColorFrameTime | ( | ) |
Gets the last color frame time, as returned by the sensor.
| int KinectManager.GetColorImageHeight | ( | ) |
Gets the height of the color image, returned by the sensor.
| Vector3 KinectManager.GetColorImageScale | ( | ) |
Gets the color image scale.
| int KinectManager.GetColorImageWidth | ( | ) |
Gets the width of the color image, returned by the sensor.
| ushort KinectManager.GetDepthForIndex | ( | int | index | ) |
Gets the depth value for the specified pixel, if ComputeUserMap is true.
| index | Depth index. |
| ushort KinectManager.GetDepthForPixel | ( | int | x, |
| int | y | ||
| ) |
Gets the depth value for the specified pixel, if ComputeUserMap is true.
| x | The X coordinate of the pixel. |
| y | The Y coordinate of the pixel. |
| long KinectManager.GetDepthFrameTime | ( | ) |
Gets the last depth frame time, as returned by the sensor.
| int KinectManager.GetDepthImageHeight | ( | ) |
Gets the height of the depth image, returned by the sensor.
| Vector3 KinectManager.GetDepthImageScale | ( | ) |
Gets the depth image scale.
| int KinectManager.GetDepthImageWidth | ( | ) |
Gets the width of the depth image, returned by the sensor.
| Vector3 KinectManager.GetDirectionBetweenJoints | ( | Int64 | userId, |
| int | firstJoint, | ||
| int | secondJoint, | ||
| bool | flipX, | ||
| bool | flipZ | ||
| ) |
Gets the direction between the given joints of the specified user.
| userId | User ID |
| firstJoint | First joint index |
| secondJoint | Second joint index |
| flipX | If set to true flips the X-coordinate |
| flipZ | If set to true flips the Z-coordinate |
| int KinectManager.GetDisplayedBodyIndex | ( | ) |
Gets the body index [0-5], if there is single body selected to be displayed on the user map, or -1 if all bodies are displayed.
| Rect KinectManager.GetForegroundRectColor | ( | Camera | foregroundCamera | ) |
Gets the foreground rectangle of the color image..
| foregroundCamera | The foreground camera, or null if there is no foreground camera. |
| Rect KinectManager.GetForegroundRectDepth | ( | Camera | foregroundCamera | ) |
Gets the foreground rectangle of the depth image.
| foregroundCamera | The foreground camera, or null if there is no foreground camera. |
| KinectGestures.Gestures KinectManager.GetGestureAtIndex | ( | Int64 | UserId, |
| int | i | ||
| ) |
Gets the gesture at the specified index for the given user.
| UserId | User ID |
| i | Index |
| float KinectManager.GetGestureProgress | ( | Int64 | UserId, |
| KinectGestures.Gestures | gesture | ||
| ) |
Gets the progress (in range [0, 1]) of the given gesture for the specified user.
| UserId | User ID |
| gesture | Gesture type |
| int KinectManager.GetGesturesCount | ( | Int64 | UserId | ) |
Gets the gestures count for the specified user.
| UserId | User ID |
| Vector3 KinectManager.GetGestureScreenPos | ( | Int64 | UserId, |
| KinectGestures.Gestures | gesture | ||
| ) |
Gets the normalized screen position of the given gesture for the specified user.
| UserId | User ID |
| gesture | Gesture type |
| List<KinectGestures.Gestures> KinectManager.GetGesturesList | ( | Int64 | UserId | ) |
Gets the list of gestures for the specified user.
| UserId | User ID |
| Vector2 KinectManager.GetJointColorMapPos | ( | Int64 | userId, |
| int | joint | ||
| ) |
Gets the joint position on the color map texture.
| userId | User ID |
| joint | Joint index |
| int KinectManager.GetJointCount | ( | ) |
Gets the the number of body joints, tracked by the sensor.
| Vector2 KinectManager.GetJointDepthMapPos | ( | Int64 | userId, |
| int | joint | ||
| ) |
Gets the joint position on the depth map texture.
| userId | User ID |
| joint | Joint index |
| Vector3 KinectManager.GetJointDirection | ( | Int64 | userId, |
| int | joint, | ||
| bool | flipX, | ||
| bool | flipZ | ||
| ) |
Gets the joint direction of the specified user, relative to its parent joint.
| userId | User ID |
| joint | Joint index |
| flipX | If set to true flips the X-coordinate |
| flipZ | If set to true flips the Z-coordinate |
| Vector3 KinectManager.GetJointKinectPosition | ( | Int64 | userId, |
| int | joint | ||
| ) |
Gets the joint position of the specified user, in Kinect coordinate system, in meters.
| userId | User ID |
| joint | Joint index |
| Quaternion KinectManager.GetJointOrientation | ( | Int64 | userId, |
| int | joint, | ||
| bool | flip | ||
| ) |
Gets the joint orientation of the specified user.
| userId | User ID |
| joint | Joint index |
| flip | If set to true, this means non-mirrored rotation |
| Vector3 KinectManager.GetJointPosColorOverlay | ( | Int64 | userId, |
| int | joint, | ||
| Camera | camera, | ||
| Rect | imageRect | ||
| ) |
Gets the 3d overlay position of the given joint over the color-image.
| userId | User ID |
| joint | Joint index |
| camera | Camera used to visualize the 3d overlay position |
| imageRect | Color image rectangle on the screen |
| Vector2 KinectManager.GetJointPosColorOverlay | ( | Int64 | userId, |
| int | joint, | ||
| Rect | imageRect | ||
| ) |
Gets the 2d overlay position of the given joint over the given image.
| userId | User ID |
| joint | Joint index |
| imageRect | Color image rectangle on the screen |
| Vector3 KinectManager.GetJointPosDepthOverlay | ( | Int64 | userId, |
| int | joint, | ||
| Camera | camera, | ||
| Rect | imageRect | ||
| ) |
Gets the 3d overlay position of the given joint over the depth-image.
| userId | User ID |
| joint | Joint index |
| camera | Camera used to visualize the 3d overlay position |
| imageRect | Depth image rectangle on the screen |
| Vector3 KinectManager.GetJointPosition | ( | Int64 | userId, |
| int | joint | ||
| ) |
Gets the joint position of the specified user, in meters.
| userId | User ID |
| joint | Joint index |
| Vector3 KinectManager.GetJointPositionFlipX | ( | Int64 | userId, |
| int | joint | ||
| ) |
Gets the joint position of the specified user with flipped x-coordinate, in meters.
| userId | User ID |
| joint | Joint index |
| KinectInterop.TrackingState KinectManager.GetJointTrackingState | ( | Int64 | userId, |
| int | joint | ||
| ) |
Gets the tracking state of the joint.
| userId | User ID |
| joint | Joint index |
| Vector3 KinectManager.GetJointVelocity | ( | Int64 | userId, |
| int | joint | ||
| ) |
Gets the joint velocity for the specified user and joint, in meters/s.
| userId | User ID. |
| joint | Joint index. |
| Matrix4x4 KinectManager.GetKinectToWorldMatrix | ( | ) |
Gets the kinect to world matrix.
| bool KinectManager.GetLeftHandInteractionBox | ( | Int64 | userId, |
| ref Vector3 | leftBotBack, | ||
| ref Vector3 | rightTopFront, | ||
| bool | bValidBox | ||
| ) |
Gets the left hand interaction box for the specified user.
true, if left hand interaction box was gotten, false otherwise.| userId | User ID |
| leftBotBack | Vector containing the left, bottom and back coordinates, in meters |
| rightTopFront | Vector containing the right, top and front coordinates, in meters |
| bValidBox | If set to true, the previously set coordinates are valid |
| KinectInterop.HandState KinectManager.GetLeftHandState | ( | Int64 | userId | ) |
Gets the left hand state for the specified user.
| userId | User ID |
| int KinectManager.GetMaxUserIndex | ( | ) |
Gets the max player-index of the currently tracked users.
| KinectInterop.JointType KinectManager.GetNextJoint | ( | KinectInterop.JointType | joint | ) |
Gets the next joint of the given joint.
| joint | Joint. |
| KinectInterop.JointType KinectManager.GetParentJoint | ( | KinectInterop.JointType | joint | ) |
Gets the parent joint of the given joint.
| joint | Joint. |
| Vector3 KinectManager.GetPosDepthOverlay | ( | int | dx, |
| int | dy, | ||
| ushort | depth, | ||
| Camera | camera, | ||
| Rect | imageRect | ||
| ) |
Gets the 3d overlay position of a point over the depth-image.
| dx | Depth image X |
| dy | Depth image X |
| depth | Distance in mm. If it is 0, the function will try to read the current depth value. |
| camera | Camera used to visualize the 3d overlay position |
| imageRect | Depth image rectangle on the screen |
| Int64 KinectManager.GetPrimaryUserID | ( | ) |
Gets the UserID of the primary user (the first or the closest one), or 0 if no user is detected.
| byte [] KinectManager.GetRawBodyIndexMap | ( | ) |
Gets the raw body index data, if ComputeUserMap is true.
| ushort [] KinectManager.GetRawDepthMap | ( | ) |
Gets the raw depth data, if ComputeUserMap is true.
| ushort [] KinectManager.GetRawInfraredMap | ( | ) |
Gets the raw infrared data, if ComputeInfraredMap is true.
| bool KinectManager.GetRightHandInteractionBox | ( | Int64 | userId, |
| ref Vector3 | leftBotBack, | ||
| ref Vector3 | rightTopFront, | ||
| bool | bValidBox | ||
| ) |
Gets the right hand interaction box for the specified user.
true, if right hand interaction box was gotten, false otherwise.| userId | User ID |
| leftBotBack | Vector containing the left, bottom and back coordinates, in meters |
| rightTopFront | ector containing the right, top and front coordinates, in meters |
| bValidBox | If set to true, the previously set coordinates are valid |
| KinectInterop.HandState KinectManager.GetRightHandState | ( | Int64 | userId | ) |
Gets the right hand state for the specified user.
| userId | User ID |
| KinectInterop.DepthSensorPlatform KinectManager.GetSensorPlatform | ( | ) |
Gets the selected depth-sensor platform.
| List<int> KinectManager.GetTrackedBodyIndices | ( | ) |
Gets the list of tracked body indices.
| Int64 KinectManager.GetUserIdByIndex | ( | int | i | ) |
Gets the user ID by the specified user index.
| i | The user index. |
| int KinectManager.GetUserIndexById | ( | Int64 | userId | ) |
Gets the user index by the specified user ID.
| userId | User ID |
| Vector3 KinectManager.GetUserKinectPosition | ( | Int64 | userId | ) |
Gets the user position in Kinect coordinate system, in meters.
| userId | User ID |
| Quaternion KinectManager.GetUserOrientation | ( | Int64 | userId, |
| bool | flip | ||
| ) |
Gets the user orientation.
| userId | User ID |
| flip | If set to true, this means non-mirrored rotation. |
| Vector3 KinectManager.GetUserPosition | ( | Int64 | userId | ) |
Gets the user position, relative to the sensor, in meters.
| userId | User ID |
| Texture KinectManager.GetUsersClrTex | ( | ) |
Gets the color image texture,if ComputeColorMap is true
| Texture2D KinectManager.GetUsersClrTex2D | ( | ) |
Gets the color image 2d-texture,if ComputeColorMap is true
| int KinectManager.GetUsersCount | ( | ) |
Gets the number of currently tracked users.
| Texture KinectManager.GetUsersLblTex | ( | ) |
Gets the users texture, if ComputeUserMap is true
| Texture2D KinectManager.GetUsersLblTex2D | ( | ) |
Gets the users 2d-texture, if ComputeUserMap is true
| string KinectManager.GetWorldMatrixData | ( | char | delimiter | ) |
Gets the world matrix data as one csv line.
| bool KinectManager.IsGestureCancelled | ( | Int64 | UserId, |
| KinectGestures.Gestures | gesture | ||
| ) |
Determines whether the given gesture for the specified user is canceled.
true if the gesture is canceled; otherwise, false.| UserId | User ID |
| gesture | Gesture type |
| bool KinectManager.IsGestureComplete | ( | Int64 | UserId, |
| KinectGestures.Gestures | gesture, | ||
| bool | bResetOnComplete | ||
| ) |
Determines whether the given gesture for the specified user is complete.
true if the gesture is complete; otherwise, false.| UserId | User ID |
| gesture | Gesture type |
| bResetOnComplete | If set to true, resets the gesture state. |
| bool KinectManager.IsInitialized | ( | ) |
Determines if the sensor and KinectManager-component are initialized and ready to use.
true if Kinect is initialized; otherwise, false.| bool KinectManager.IsJointTracked | ( | Int64 | userId, |
| int | joint | ||
| ) |
Determines whether the given joint of the specified user is being tracked.
true if this instance is joint tracked the specified userId joint; otherwise, false.| userId | User ID |
| joint | Joint index |
|
static |
Determines if the sensor and KinectManager-component are initialized and ready to use.
true if Kinect is initialized; otherwise, false.| bool KinectManager.IsLeftHandConfidenceHigh | ( | Int64 | userId | ) |
Determines whether the left hand confidence is high for the specified user.
true if the left hand confidence is high; otherwise, false.| userId | User ID |
| bool KinectManager.IsPlayModeEnabled | ( | ) |
Determines whether the play mode is enabled or not.
true if the play mode is enabled; otherwise, false.| bool KinectManager.IsRightHandConfidenceHigh | ( | Int64 | userId | ) |
Determines whether the right hand confidence is high for the specified user.
true if the right hand confidence is high; otherwise, false.| userId | User ID |
| bool KinectManager.IsTrackedUsersLimited | ( | ) |
Determines whether the tracked users are limited by their number or distance or not.
true if the users are limited by number or distance; otherwise, false.| bool KinectManager.IsTrackingGesture | ( | Int64 | UserId, |
| KinectGestures.Gestures | gesture | ||
| ) |
Determines whether the given gesture is in the list of gestures for the specified user.
true if the gesture is in the list of gestures for the specified user; otherwise, false.| UserId | User ID |
| gesture | Gesture type |
| bool KinectManager.IsUserDetected | ( | ) |
Determines whether at least one user is currently detected by the sensor
true if at least one user is detected; otherwise, false.| bool KinectManager.IsUserDetected | ( | int | i | ) |
Determines whether the user with the specified index is currently detected by the sensor
true if the user is detected; otherwise, false.| i | The user index. |
| bool KinectManager.IsUserTracked | ( | Int64 | userId | ) |
Determines whether the user with the specified userId is in the list of tracked users or not.
true if the user with the specified userId is tracked; otherwise, false.| userId | User identifier. |
| bool KinectManager.IsUserTurnedAround | ( | Int64 | userId | ) |
Determines whether the given user is turned around or not.
true if the user is turned around; otherwise, false.| userId | User ID |
| bool KinectManager.MapColorFrameToDepthCoords | ( | ref Vector2 [] | avDepthCoords | ) |
Maps the color frame to depth coordinates.
true on success, false otherwise.| avDepthCoords | Buffer for color-to-depth coordinates. |
| Vector2 KinectManager.MapColorPointToDepthCoords | ( | Vector2 | colorPos, |
| bool | bReadDepthCoordsIfNeeded | ||
| ) |
Returns the depth-map coordinates of a color point.
| colorPos | Color position. |
| bReadDepthCoordsIfNeeded | If set to true allows reading of depth coords, if needed. |
| bool KinectManager.MapDepthFrameToColorCoords | ( | ref Vector2 [] | avColorCoords | ) |
Maps the depth frame to color coordinates.
true on success, false otherwise.| avColorCoords | Buffer for depth-to-color coordinates. |
| bool KinectManager.MapDepthFrameToSpaceCoords | ( | ref Vector3 [] | avSpaceCoords | ) |
Maps the depth frame to space coordinates.
true on success, false otherwise.| avSpaceCoords | Buffer for the depth-to-space coordinates. |
| Vector2 KinectManager.MapDepthPointToColorCoords | ( | Vector2 | posPoint, |
| ushort | depthValue | ||
| ) |
Returns the color-map coordinates of a depth point.
| posPoint | Depth point coordinates |
| depthValue | Depth value |
| Vector3 KinectManager.MapDepthPointToSpaceCoords | ( | Vector2 | posPoint, |
| ushort | depthValue, | ||
| bool | bWorldCoords | ||
| ) |
Returns the space coordinates of a depth-map point, or Vector3.zero if the sensor is not initialized
| posPoint | Depth point coordinates |
| depthValue | Depth value |
| bWorldCoords | If set to true, applies the sensor height and angle to the space coordinates. |
| Vector2 KinectManager.MapSpacePointToDepthCoords | ( | Vector3 | posPoint | ) |
Returns the depth-map coordinates of a space point, or Vector2.zero if Kinect is not initialized
| posPoint | Space point coordinates |
|
virtual |
Rearranges the user indices, according to the current criteria
| void KinectManager.refreshAvatarControllers | ( | ) |
Refreshs the avatar controllers' list.
| void KinectManager.RefreshAvatarUserIds | ( | ) |
Refreshs the userIds of all available avatar controllers, after new user appears in front of the sensor, or when some user gets lost.
| void KinectManager.refreshGestureListeners | ( | ) |
Refreshs the gesture listeners' list.
| void KinectManager.ResetFilters | ( | ) |
Resets the Kinect data filters.
| bool KinectManager.ResetGesture | ( | Int64 | UserId, |
| KinectGestures.Gestures | gesture | ||
| ) |
Resets the gesture state for the given gesture of the specified user.
true, if gesture was reset, false otherwise.| UserId | User ID |
| gesture | Gesture type |
| void KinectManager.ResetPlayerGestures | ( | Int64 | UserId | ) |
Resets the gesture states for all gestures of the specified user.
| UserId | User ID |
| bool KinectManager.SetBodyFrameData | ( | string | sLine | ) |
Sets the body frame from the given csv line.
true on success, false otherwise.| sLine | The body frame as csv line. |
| bool KinectManager.SetBodyHandData | ( | string | sLine | ) |
Sets the body hand data from the given csv line.
true on success, false otherwise.| sLine | The hand data as csv line. |
| bool KinectManager.SetDisplayedBodyIndex | ( | int | iBodyIndex | ) |
Sets the body index [0-5], if a single body must be displayed on the user map, or -1 if all bodies must be displayed.
true, if the change was successful, false otherwise.| iBodyIndex | The single body index, or -1 if all bodies must be displayed. |
| void KinectManager.SetKinectToWorldMatrix | ( | Vector3 | sensorPos, |
| Quaternion | sensorRot, | ||
| Vector3 | sensorScale | ||
| ) |
Sets the kinect to world matrix.
| sensorPos | Sensor position. |
| sensorRot | Sensor rotation. |
| sensorScale | Position scale (could be used to flip left-right). |
| bool KinectManager.SetPrimaryUserID | ( | Int64 | userId | ) |
Sets the primary user ID, in order to change the active user.
true, if primary user ID was set, false otherwise.| userId | User ID |
| bool KinectManager.SetWorldMatrixData | ( | string | sLine | ) |
Sets the world matrix data from the given csv line.
true on success, false otherwise.| sLine | The kinect2world data as csv line. |
| void KinectManager.UpdateKinectToWorldMatrix | ( | ) |
Updates the kinect to world transform matrix, according to the current values of SensorHeight, SensorAngle and FlipLeftRight.
|
staticget |
Gets the single KinectManager instance.
The KinectManager instance.