CUGL 2.1
Cornell University Game Library
|
#include <CUSpinGesture.h>
Public Member Functions | |
SpinEvent () | |
SpinEvent (const Timestamp &stamp, const Vec2 anchor, float angle) | |
SpinEvent (const SpinEvent &event) | |
void | clear () |
Public Attributes | |
Timestamp | start |
Timestamp | now |
Vec2 | anchor |
float | origAngle |
float | currAngle |
float | delta |
This simple class is a struct to hold a spin event.
A spin event is a gesture with duration. Hence this event stores information about the start of the event, as well as the current status of the event.
|
inline |
Constructs a new spin event with the default values
Constructs a new spin event with the given values
stamp | The timestamp for the event |
anchor | The normalized pinch center |
angle | The initial finger angle |
|
inline |
Constructs a new pinch event that is a copy of the given one
event | The event to copy |
|
inline |
Clears the contents of this spin event
Vec2 cugl::SpinEvent::anchor |
The normalized center of this pinch
float cugl::SpinEvent::currAngle |
The current angle of the spin
float cugl::SpinEvent::delta |
The rotation delta since the last animation frame
Timestamp cugl::SpinEvent::now |
The current time of the gesture
float cugl::SpinEvent::origAngle |
The initial angle of the spin
Timestamp cugl::SpinEvent::start |
The starting time of the gesture