Class IUsesFaceTrackingMethods
Namespace: Unity.MARS
Syntax
public static class IUsesFaceTrackingMethods
Methods
GetFaces(IUsesFaceTracking, List<IMRFace>)
Get the currently tracked faces
Declaration
public static void GetFaces(this IUsesFaceTracking obj, List<IMRFace> faces)
Parameters
Type | Name | Description |
---|---|---|
IUsesFaceTracking | obj | |
List<IMRFace> | faces | A list of IMRFace objects to which the currently tracked planes will be added |
GetMaxFaceCount(IUsesFaceTracking)
Get the total number of faces that can be tracked by this provider simultaneously
Declaration
public static int GetMaxFaceCount(this IUsesFaceTracking obj)
Parameters
Type | Name | Description |
---|---|---|
IUsesFaceTracking | obj |
Returns
Type | Description |
---|---|
Int32 | The maximum possible number of simultaneously tracked faces, -1 if there is no theoretical limit |
SubscribeFaceAdded(IUsesFaceTracking, Action<IMRFace>)
Subscribe to the faceAdded event, which is called whenever a face becomes tracked for the first time
Declaration
public static void SubscribeFaceAdded(this IUsesFaceTracking obj, Action<IMRFace> faceAdded)
Parameters
Type | Name | Description |
---|---|---|
IUsesFaceTracking | obj | |
Action<IMRFace> | faceAdded | The delegate to subscribe |
SubscribeFaceRemoved(IUsesFaceTracking, Action<IMRFace>)
Subscribe to the faceRemoved event, which is called whenever a tracked face is removed (lost)
Declaration
public static void SubscribeFaceRemoved(this IUsesFaceTracking obj, Action<IMRFace> faceRemoved)
Parameters
Type | Name | Description |
---|---|---|
IUsesFaceTracking | obj | |
Action<IMRFace> | faceRemoved | The delegate to subscribe |
SubscribeFaceUpdated(IUsesFaceTracking, Action<IMRFace>)
Subscribe to the faceUpdated event, which is called when a tracked face has updated data
Declaration
public static void SubscribeFaceUpdated(this IUsesFaceTracking obj, Action<IMRFace> faceUpdated)
Parameters
Type | Name | Description |
---|---|---|
IUsesFaceTracking | obj | |
Action<IMRFace> | faceUpdated | The delegate to subscribe |
UnsubscribeFaceAdded(IUsesFaceTracking, Action<IMRFace>)
Unsubscribe a delegate from the faceAdded event
Declaration
public static void UnsubscribeFaceAdded(this IUsesFaceTracking obj, Action<IMRFace> faceAdded)
Parameters
Type | Name | Description |
---|---|---|
IUsesFaceTracking | obj | |
Action<IMRFace> | faceAdded | The delegate to unsubscribe |
UnsubscribeFaceRemoved(IUsesFaceTracking, Action<IMRFace>)
Unsubscribe a delegate from the faceRemoved event
Declaration
public static void UnsubscribeFaceRemoved(this IUsesFaceTracking obj, Action<IMRFace> faceRemoved)
Parameters
Type | Name | Description |
---|---|---|
IUsesFaceTracking | obj | |
Action<IMRFace> | faceRemoved | The delegate to unsubscribe |
UnsubscribeFaceUpdated(IUsesFaceTracking, Action<IMRFace>)
Unsubscribe a delegate from the faceUpdated event
Declaration
public static void UnsubscribeFaceUpdated(this IUsesFaceTracking obj, Action<IMRFace> faceUpdated)
Parameters
Type | Name | Description |
---|---|---|
IUsesFaceTracking | obj | |
Action<IMRFace> | faceUpdated | The delegate to unsubscribe |