Click or drag to resize

GesturePreprocessorExtract Method

Convert captured gesture points into discrete ones.

Namespace:  RavingBots.MagicGestures.AI
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
private void Extract(
	GestureData gesture
)

Parameters

gesture
Type: RavingBots.MagicGestures.ControllerGestureData
Remarks
Important note Important
The gesture must be valid (IsValid and have at least one point.

First, every gesture point is normalized so that all of their coordinates are in range [0, 1], where points (0, 0, 0) and (1, 1, 1) are corners of the gesture's bounding box (see GetNormalized(Vector3)).

After that normalized points are mapped into equivalent points on a discrete 3D grid (see GetDiscretized(Vector3, Vector3Int)). Note that this is inherently a lossy operation — multiple captured points might be mapped into a single discrete point.

See Also