TouchScript — multitouch library for Unity
TouchScript — multitouch library for Unity
TouchScript
TouchScript.Utils
ClusterUtils Class
ClusterUtils Methods
Get2DCenterPosition Method
GetPointsHash Method
GetPrevious2DCenterPosition Method
ClusterUtils
Get2DCenterPosition Method
Calculates the centroid of pointers' positions.
Namespace:
TouchScript.Utils
Assembly:
Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
Copy
public
static
Vector2
Get2DCenterPosition
(
IList
<
Pointer
>
pointers
)
Parameters
pointers
Type:
System.Collections.Generic
IList
Pointer
List of pointers.
Return Value
Type:
Vector2
Centroid of pointers' positions or
INVALID_POSITION
if cluster contains no points.
See Also
Reference
ClusterUtils Class
TouchScript.Utils Namespace