C# Класс Kinect.FacetrackingManager

Facetracking manager is the component that deals with head and face tracking.
Наследование: UnityEngine.MonoBehaviour
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
CreateFaceModelMesh ( ) : void
UpdateFaceModelMesh ( ) : void

Описание методов

GetAnimUnit() публичный Метод

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.
Результат float

GetFaceColorRect() публичный Метод

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
Результат UnityEngine.Rect

GetFaceModelTriangleIndices() публичный Метод

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.
Результат int[]

GetFaceModelVertex() публичный Метод

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
Результат Vector3

GetFaceModelVertexCount() публичный Метод

Gets the count of face model vertices.
public GetFaceModelVertexCount ( ) : int
Результат int

GetFaceModelVertices() публичный Метод

Gets all face model vertices, if a face model is available; null otherwise.
public GetFaceModelVertices ( ) : Vector3[]
Результат Vector3[]

GetFaceTrackingID() публичный Метод

Gets the current user ID, or 0 if no user is currently tracked.
public GetFaceTrackingID ( ) : long
Результат long

GetHeadPosition() публичный Метод

Gets the head position of the currently tracked user.
public GetHeadPosition ( bool bMirroredMovement ) : Vector3
bMirroredMovement bool If set to true returns mirorred head position.
Результат Vector3

GetHeadPosition() публичный Метод

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.
Результат Vector3

GetHeadRotation() публичный Метод

Gets the head rotation of the currently tracked user.
public GetHeadRotation ( bool bMirroredMovement ) : Quaternion
bMirroredMovement bool If set to true returns mirorred head rotation.
Результат UnityEngine.Quaternion

GetHeadRotation() публичный Метод

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.
Результат UnityEngine.Quaternion

GetShapeUnit() публичный Метод

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.
Результат float

GetUserAnimUnits() публичный Метод

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.
Результат bool

GetUserFaceVertices() публичный Метод

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.
Результат bool

GetUserShapeUnits() публичный Метод

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.
Результат bool

IsFaceTrackingInitialized() публичный Метод

Determines the facetracking system was successfully initialized, false otherwise.
public IsFaceTrackingInitialized ( ) : bool
Результат bool

IsGotAU() публичный Метод

Determines whether there are valid anim units.
public IsGotAU ( ) : bool
Результат bool

IsGotSU() публичный Метод

Determines whether there are valid shape units.
public IsGotSU ( ) : bool
Результат bool

IsTrackingFace() публичный Метод

Determines whether this the sensor is currently tracking a face.
public IsTrackingFace ( ) : bool
Результат bool

IsTrackingFace() публичный Метод

Determines whether the sensor is currently tracking the face of the specified user.
public IsTrackingFace ( long userId ) : bool
userId long User ID
Результат bool

OnDestroy() публичный Метод

public OnDestroy ( ) : void
Результат void

OnGUI() публичный Метод

public OnGUI ( ) : void
Результат void

Start() публичный Метод

public Start ( ) : void
Результат void

Update() публичный Метод

public Update ( ) : void
Результат void