![]() |
CUGL 2.5
Cornell University Game Library
|
#include <CUGestureRecognizer.h>
Public Member Functions | |
UnistrokeGesture () | |
const std::string | getName () const |
const Vec2 & | getOrientation () const |
const std::vector< Vec2 > & | getPoints () const |
const std::vector< float > & | getVector () const |
float | getAngle (const UnistrokeGesture &other) const |
float | getDollarSimilarity (const UnistrokeGesture &other) const |
float | getProtractorSimilarity (const UnistrokeGesture &other) const |
Friends | |
class | GestureRecognizer |
A class representing a unistroke gesture
This object represents a normalized unistroke gesture stored inside of a gesture recognizer. As the normalization algorithm is deteremined by the current settings, there are no publicly accessible constructors for this class.
|
inline |
Creates an uninitialized gesture with no information
float cugl::UnistrokeGesture::getAngle | ( | const UnistrokeGesture & | other | ) | const |
Returns the (normalized) angles between the two gestures
other | The gesture to compare |
float cugl::UnistrokeGesture::getDollarSimilarity | ( | const UnistrokeGesture & | other | ) | const |
Returns the $1 similarity between the two gestures
other | The gesture to compare |
|
inline |
Returns the string identifier of this gesture
|
inline |
Returns the orientation of the gesture.
The orientation is defined as the vector from the initial point to a (normalized) centroid. This allows us to control the rotation of gestures.
|
inline |
Returns the vector of 2D points representing this gesture
float cugl::UnistrokeGesture::getProtractorSimilarity | ( | const UnistrokeGesture & | other | ) | const |
Returns the PROTRACTOR similarity between this gesture and the other
other | The gesture to compare |
|
inline |
Returns the vectorized representation of this gesture.
The vectorized representation is a normalized, high dimensional vector.