Represents a single acceleration value. More...
#include <AccelEvent.h>
Inherits cinder::app::Event.
Public Member Functions | |
AccelEvent (const Vec3f &data, const Vec3f &rawData, const Vec3f &prevData, const Vec3f &prevRawData) | |
Vec3f | getData () const |
Returns the filtered data for this event as a Vec3f representing the forces applied to the device. | |
Vec3f | getRawData () const |
Returns the unfiltered data for this event as a Vec3f representing the forces applied to the device. | |
Vec3f | getPrevData () const |
Returns the filtered data for the previous event as a Vec3f representing the forces applied to the device. | |
Vec3f | getPrevRawData () const |
Returns the raw data for the previous event as a Vec3f representing the forces applied to the device. | |
bool | isShake (float shakeDelta=2.2f) const |
Returns whether this acceleration constitutes a shake, as defined by an acceleration of magnitude >= shakeDelta. | |
Vec2f | getPolarPlaneVector () const |
Vec2f | getPlaneVector () const |
Matrix44f | getMatrix () const |
Returns a matrix representing a transformation from an upright orientation (0,-1,0) to the current orientation. |
Represents a single acceleration value.
cinder::app::AccelEvent::AccelEvent | ( | const Vec3f & | data, |
const Vec3f & | rawData, | ||
const Vec3f & | prevData, | ||
const Vec3f & | prevRawData | ||
) |
Vec3f cinder::app::AccelEvent::getData | ( | ) | const |
Returns the filtered data for this event as a Vec3f representing the forces applied to the device.
Vec3f cinder::app::AccelEvent::getRawData | ( | ) | const |
Returns the unfiltered data for this event as a Vec3f representing the forces applied to the device.
Vec3f cinder::app::AccelEvent::getPrevData | ( | ) | const |
Returns the filtered data for the previous event as a Vec3f representing the forces applied to the device.
Vec3f cinder::app::AccelEvent::getPrevRawData | ( | ) | const |
Returns the raw data for the previous event as a Vec3f representing the forces applied to the device.
bool cinder::app::AccelEvent::isShake | ( | float | shakeDelta = 2.2f | ) | const |
Returns whether this acceleration constitutes a shake, as defined by an acceleration of magnitude >= shakeDelta.
Vec2f cinder::app::AccelEvent::getPlaneVector | ( | ) | const |
Matrix44f cinder::app::AccelEvent::getMatrix | ( | ) | const |
Returns a matrix representing a transformation from an upright orientation (0,-1,0) to the current orientation.