CUGL 2.5
Cornell University Game Library
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
cugl::UnistrokeGesture Class Reference

#include <CUGestureRecognizer.h>

Public Member Functions

 UnistrokeGesture ()
 
const std::string getName () const
 
const Vec2getOrientation () 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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ UnistrokeGesture()

cugl::UnistrokeGesture::UnistrokeGesture ( )
inline

Creates an uninitialized gesture with no information

Member Function Documentation

◆ getAngle()

float cugl::UnistrokeGesture::getAngle ( const UnistrokeGesture other) const

Returns the (normalized) angles between the two gestures

Parameters
otherThe gesture to compare
Returns
the (normalized) angles between the two gestures

◆ getDollarSimilarity()

float cugl::UnistrokeGesture::getDollarSimilarity ( const UnistrokeGesture other) const

Returns the $1 similarity between the two gestures

Parameters
otherThe gesture to compare
Returns
the $1 similarity between the two gestures

◆ getName()

const std::string cugl::UnistrokeGesture::getName ( ) const
inline

Returns the string identifier of this gesture

Returns
the string identifier of this gesture

◆ getOrientation()

const Vec2 & cugl::UnistrokeGesture::getOrientation ( ) const
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.

Returns
the orientation of the gesture.

◆ getPoints()

const std::vector< Vec2 > & cugl::UnistrokeGesture::getPoints ( ) const
inline

Returns the vector of 2D points representing this gesture

Returns
the vector of 2D points representing this gesture

◆ getProtractorSimilarity()

float cugl::UnistrokeGesture::getProtractorSimilarity ( const UnistrokeGesture other) const

Returns the PROTRACTOR similarity between this gesture and the other

Parameters
otherThe gesture to compare
Returns
the PROTRACTOR similarity between the two gestures

◆ getVector()

const std::vector< float > & cugl::UnistrokeGesture::getVector ( ) const
inline

Returns the vectorized representation of this gesture.

The vectorized representation is a normalized, high dimensional vector.

Returns
the vectorized representation of this gesture.

The documentation for this class was generated from the following file: