C# Class Kinect.FacetrackingManager

Facetracking manager is the component that deals with head and face tracking.
Inheritance: UnityEngine.MonoBehaviour
Datei anzeigen Open project: BrainProject/UnityTemp Class Usage Examples

Public Methods

Method Description
GetAnimUnit ( KinectInterop faceAnimKey ) : float

Gets the animation unit value at given index, or 0 if the index is invalid.

GetFaceColorRect ( long userId ) : Rect

Gets the tracked face rectangle of the specified user in color image coordinates, or zero-rect if the user's face is not tracked.

GetFaceModelTriangleIndices ( bool bMirroredModel ) : int[]

Gets the face model triangle indices, if a face model is available; null otherwise.

GetFaceModelVertex ( int index ) : Vector3

Gets the face model vertex, if a face model is available and the index is in range; Vector3.zero otherwise.

GetFaceModelVertexCount ( ) : int

Gets the count of face model vertices.

GetFaceModelVertices ( ) : Vector3[]

Gets all face model vertices, if a face model is available; null otherwise.

GetFaceTrackingID ( ) : long

Gets the current user ID, or 0 if no user is currently tracked.

GetHeadPosition ( bool bMirroredMovement ) : Vector3

Gets the head position of the currently tracked user.

GetHeadPosition ( long userId, bool bMirroredMovement ) : Vector3

Gets the head position of the specified user.

GetHeadRotation ( bool bMirroredMovement ) : Quaternion

Gets the head rotation of the currently tracked user.

GetHeadRotation ( long userId, bool bMirroredMovement ) : Quaternion

Gets the head rotation of the specified user.

GetShapeUnit ( KinectInterop faceShapeKey ) : float

Gets the shape unit value at given index, or 0 if the index is invalid.

GetUserAnimUnits ( long userId, float>.Dictionary &dictAnimUnits ) : bool

Gets all animation units for the specified user.

GetUserFaceVertices ( long userId, Vector3 &avVertices ) : bool

Gets all face model vertices for the specified user.

GetUserShapeUnits ( long userId, float>.Dictionary &dictShapeUnits ) : bool

Gets all animation units for the specified user.

IsFaceTrackingInitialized ( ) : bool

Determines the facetracking system was successfully initialized, false otherwise.

IsGotAU ( ) : bool

Determines whether there are valid anim units.

IsGotSU ( ) : bool

Determines whether there are valid shape units.

IsTrackingFace ( ) : bool

Determines whether this the sensor is currently tracking a face.

IsTrackingFace ( long userId ) : bool

Determines whether the sensor is currently tracking the face of the specified user.

OnDestroy ( ) : void
OnGUI ( ) : void
Start ( ) : void
Update ( ) : void

Private Methods

Method Description
CreateFaceModelMesh ( ) : void
UpdateFaceModelMesh ( ) : void

Method Details

GetAnimUnit() public method

Gets the animation unit value at given index, or 0 if the index is invalid.
public GetAnimUnit ( KinectInterop faceAnimKey ) : float
faceAnimKey KinectInterop Face animation unit.
return float

GetFaceColorRect() public method

Gets the tracked face rectangle of the specified user in color image coordinates, or zero-rect if the user's face is not tracked.
public GetFaceColorRect ( long userId ) : Rect
userId long User ID
return UnityEngine.Rect

GetFaceModelTriangleIndices() public method

Gets the face model triangle indices, if a face model is available; null otherwise.
public GetFaceModelTriangleIndices ( bool bMirroredModel ) : int[]
bMirroredModel bool If set to true gets mirorred model indices.
return int[]

GetFaceModelVertex() public method

Gets the face model vertex, if a face model is available and the index is in range; Vector3.zero otherwise.
public GetFaceModelVertex ( int index ) : Vector3
index int Vertex index, or Vector3.zero
return Vector3

GetFaceModelVertexCount() public method

Gets the count of face model vertices.
public GetFaceModelVertexCount ( ) : int
return int

GetFaceModelVertices() public method

Gets all face model vertices, if a face model is available; null otherwise.
public GetFaceModelVertices ( ) : Vector3[]
return Vector3[]

GetFaceTrackingID() public method

Gets the current user ID, or 0 if no user is currently tracked.
public GetFaceTrackingID ( ) : long
return long

GetHeadPosition() public method

Gets the head position of the currently tracked user.
public GetHeadPosition ( bool bMirroredMovement ) : Vector3
bMirroredMovement bool If set to true returns mirorred head position.
return Vector3

GetHeadPosition() public method

Gets the head position of the specified user.
public GetHeadPosition ( long userId, bool bMirroredMovement ) : Vector3
userId long User ID
bMirroredMovement bool If set to true returns mirorred head position.
return Vector3

GetHeadRotation() public method

Gets the head rotation of the currently tracked user.
public GetHeadRotation ( bool bMirroredMovement ) : Quaternion
bMirroredMovement bool If set to true returns mirorred head rotation.
return UnityEngine.Quaternion

GetHeadRotation() public method

Gets the head rotation of the specified user.
public GetHeadRotation ( long userId, bool bMirroredMovement ) : Quaternion
userId long User ID
bMirroredMovement bool If set to true returns mirorred head rotation.
return UnityEngine.Quaternion

GetShapeUnit() public method

Gets the shape unit value at given index, or 0 if the index is invalid.
public GetShapeUnit ( KinectInterop faceShapeKey ) : float
faceShapeKey KinectInterop Face shape unit.
return float

GetUserAnimUnits() public method

Gets all animation units for the specified user.
public GetUserAnimUnits ( long userId, float>.Dictionary &dictAnimUnits ) : bool
userId long User ID
dictAnimUnits float>.Dictionary Animation units dictionary, to get the results.
return bool

GetUserFaceVertices() public method

Gets all face model vertices for the specified user.
public GetUserFaceVertices ( long userId, Vector3 &avVertices ) : bool
userId long User ID
avVertices Vector3 Reference to array of vertices, to get the result.
return bool

GetUserShapeUnits() public method

Gets all animation units for the specified user.
public GetUserShapeUnits ( long userId, float>.Dictionary &dictShapeUnits ) : bool
userId long User ID
dictShapeUnits float>.Dictionary Shape units dictionary, to get the results.
return bool

IsFaceTrackingInitialized() public method

Determines the facetracking system was successfully initialized, false otherwise.
public IsFaceTrackingInitialized ( ) : bool
return bool

IsGotAU() public method

Determines whether there are valid anim units.
public IsGotAU ( ) : bool
return bool

IsGotSU() public method

Determines whether there are valid shape units.
public IsGotSU ( ) : bool
return bool

IsTrackingFace() public method

Determines whether this the sensor is currently tracking a face.
public IsTrackingFace ( ) : bool
return bool

IsTrackingFace() public method

Determines whether the sensor is currently tracking the face of the specified user.
public IsTrackingFace ( long userId ) : bool
userId long User ID
return bool

OnDestroy() public method

public OnDestroy ( ) : void
return void

OnGUI() public method

public OnGUI ( ) : void
return void

Start() public method

public Start ( ) : void
return void

Update() public method

public Update ( ) : void
return void