BodyExtensions Class (KinectEx)

Contains a number of helpful extensions to Kinect Body (and KinectEx IBody) class. Included are methods to get individual bones (really start and end joints), find angles between bones (whether connected by a common joint or not), and to find the distance between joints.
System.Object
   KinectEx.BodyExtensions

Namespace: KinectEx
Assembly: KinectEx (KinectEx.dll 0.4.0.0)
  • C#
  • VB
  • C++
  • F#
[ExtensionAttribute]
public static class BodyExtensions

Syntax for VB is not yet implemented.

Syntax for C++ is not yet implemented

[<ExtensionAttribute>]
[<AbstractClass>]
[<Sealed>]
type public BodyExtensions = class end

The BodyExtensions type exposes the following members.

  Platforms Name Description
BonesAt Lists the two BoneTypeEx values that intersect at a given joint. 
Top
  Platforms Name Description
AngleBetween Gets the angle between two Vector3 (SharpDX / DirectX) values. Derived from System.Media.Media3D.Vector3D source code. 
GetAngleAt(Body, JointType) Returns the angle (in degrees) between the two bones that intersect at the specified JointType value. 
GetAngleAt(Body, JointType) Returns the angle (in degrees) between the two bones that intersect at the specified JointType value. 
GetAngleAt(IBody, JointTypeEx) Returns the angle (in degrees) between the two bones that intersect at the specified JointTypeEx value. 
GetAngleBetween(IBody, BoneTypeEx, BoneTypeEx, bool, bool) Returns the angle (in degrees) between the two specified BoneTypeEx values. Optionally allows for either or both bones to be inverted to achieve the desired orientation. 
GetAngleBetween(Body, BoneTypeEx, BoneTypeEx, bool, bool) Returns the angle (in degrees) between the two specified BoneTypeEx values. Optionally allows for either or both bones to be inverted to achieve the desired orientation. 
GetAngleBetween(Body, BoneTypeEx, BoneTypeEx, bool, bool) Returns the angle (in degrees) between the two specified BoneTypeEx values. Optionally allows for either or both bones to be inverted to achieve the desired orientation. 
GetBone(IBody, BoneTypeEx) Gets a Bone structure containing the two IJoint values that constitute the start and end of the specified BoneTypeEx
GetBone(Body, BoneTypeEx) Gets a Bone structure containing the two IJoint values that constitute the start and end of the specified BoneTypeEx
GetBone(Body, BoneTypeEx) Gets a Bone structure containing the two IJoint values that constitute the start and end of the specified BoneTypeEx
GetBonesAt(Body, JointType) Gets a list of the two Bone values that share the specified JointType value. 
GetBonesAt(Body, JointType) Gets a list of the two Bone values that share the specified JointType value. 
GetBonesAt(IBody, JointTypeEx) Gets a list of the two Bone values that share the specified JointTypeEx value. 
GetDistanceBetween(Body, JointType, JointType) Returns the distance (in meters) between the two specified joints. 
GetDistanceBetween(Body, JointType, JointType) Returns the distance (in meters) between the two specified joints. 
GetDistanceBetween(IBody, JointTypeEx, JointTypeEx) Returns the distance (in meters) between the two specified joints. 
GetMirroredJoint(Body, JointType) Gets an IJoint object representing the joint that mirrors the specified JointType (e.g., the left wrist mirrors the right wrist). 
GetMirroredJoint(IBody, JointTypeEx) Gets an IJoint object representing the joint that mirrors the specified JointTypeEx (e.g., the left wrist mirrors the right wrist). 
GetMirroredJoint(Body, JointType) Gets an IJoint object representing the joint that mirrors the specified JointType (e.g., the left wrist mirrors the right wrist). 
GetMirroredJointOrientation(Body, JointType) Gets the IJointOrientation of the joint that mirrors the specified JointType (e.g., the left wrist mirrors the right wrist). 
GetMirroredJointOrientation(Body, JointType) Gets the IJointOrientation of the joint that mirrors the specified JointType (e.g., the left wrist mirrors the right wrist). 
GetMirroredJointOrientation(IBody, JointTypeEx) Gets the IJointOrientation of the joint that mirrors the specified JointTypeEx (e.g., the left wrist mirrors the right wrist). 
GetVector(Body, JointType, JointType) Get a Vector3 (SharpDX / DirectX) object representing the vector between two given JointType values.. 
GetVector(Body, JointType, JointType) Get a Vector3 (SharpDX / DirectX) object representing the vector between two given JointType values.. 
GetVector(Body, BoneTypeEx, bool) Get a Vector3 (SharpDX / DirectX) object representing the vector between the joints of the specified BoneTypeEx value. Optionally allows for the bone to be inverted to achieve the desired orientation. 
GetVector(IBody, BoneTypeEx, bool) Get a Vector3 (SharpDX / DirectX) object representing the vector between the joints of the specified BoneTypeEx value. Optionally allows for the bone to be inverted to achieve the desired orientation. 
GetVector(IBody, JointTypeEx, JointTypeEx) Get a Vector3 (SharpDX / DirectX) object representing the vector between two given JointTypeEx values.. 
GetVector(Body, BoneTypeEx, bool) Get a Vector3 (SharpDX / DirectX) object representing the vector between the joints of the specified BoneTypeEx value. Optionally allows for the bone to be inverted to achieve the desired orientation. 
MapColorPositions<T> Iterates over a list of bodies to map each body's CameraSpacePoint joint locations to ColorSpacePoints. 
MapDepthPositions<T> Iterates over a list of bodies to map each body's CameraSpacePoint joint locations to DepthSpacePoints. 
RefreshFromBodyArray<T>(IList<T>, Body[]) Similar to the Kinect SDK method BodyFrame.GetAndRefreshBodyData, this method uses the values from the specified Body array to update the values in this collection. If the current collection does not contain the correct number of bodies, this method clears and refills this collection with new bodies of type T. Note that if this behavior is undesirable, insure that the collection contains the right number of bodies before calling this method. 
RefreshFromBodyArray<T>(IList<T>, Body[]) Similar to the Kinect SDK method BodyFrame.GetAndRefreshBodyData, this method uses the values from the specified Body array to update the values in this collection. If the current collection does not contain the correct number of bodies, this method clears and refills this collection with new bodies of type T. Note that if this behavior is undesirable, insure that the collection contains the right number of bodies before calling this method. 
RefreshFromBodyList<T> Similar to the Kinect SDK method BodyFrame.GetAndRefreshBodyData, this method uses the values from the source IBody collection to update the values in this collection. If the current collection does not contain the correct number of bodies, this method clears and refills this collection with new bodies of type T. Note that if this behavior is undesirable, insure that the collection contains the right number of bodies before calling this method. 
Top
Supported in:

    
 Windows Desktop - .NET 4.5
    
 Windows Desktop - .NET 4.5 (without Kinect SDK)
    
 Windows 8.1 Store - WinRT
    
 Windows 8.1 Store - WinRT (without Kinect SDK)
    
 Windows Phone 8 - WinRT