public final class GestureUtils extends Object
Modifier and Type | Method and Description |
---|---|
static OrientedBoundingBox |
computeOrientedBoundingBox(ArrayList<GesturePoint> originalPoints)
Computes an oriented, minimum bounding box of a set of points.
|
static OrientedBoundingBox |
computeOrientedBoundingBox(float[] originalPoints)
Computes an oriented, minimum bounding box of a set of points.
|
static float[] |
spatialSampling(Gesture gesture,
int bitmapSize)
Samples the gesture spatially by rendering the gesture into a 2D
grayscale bitmap.
|
static float[] |
spatialSampling(Gesture gesture,
int bitmapSize,
boolean keepAspectRatio)
Samples the gesture spatially by rendering the gesture into a 2D
grayscale bitmap.
|
static float[] |
temporalSampling(GestureStroke stroke,
int numPoints)
Samples a stroke temporally into a given number of evenly-distributed
points.
|
public static float[] spatialSampling(Gesture gesture, int bitmapSize)
gesture
- the gesture to be sampledbitmapSize
- the size of the bitmappublic static float[] spatialSampling(Gesture gesture, int bitmapSize, boolean keepAspectRatio)
gesture
- the gesture to be sampledbitmapSize
- the size of the bitmapkeepAspectRatio
- if the scaling should keep the gesture's
aspect ratiopublic static float[] temporalSampling(GestureStroke stroke, int numPoints)
stroke
- the gesture stroke to be samplednumPoints
- the number of pointspublic static OrientedBoundingBox computeOrientedBoundingBox(ArrayList<GesturePoint> originalPoints)
originalPoints
- public static OrientedBoundingBox computeOrientedBoundingBox(float[] originalPoints)
originalPoints
-