CUGL 2.1
Cornell University Game Library
Public Member Functions | Public Attributes | List of all members
cugl::SpinEvent Class Reference

#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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ SpinEvent() [1/3]

cugl::SpinEvent::SpinEvent ( )
inline

Constructs a new spin event with the default values

◆ SpinEvent() [2/3]

cugl::SpinEvent::SpinEvent ( const Timestamp stamp,
const Vec2  anchor,
float  angle 
)
inline

Constructs a new spin event with the given values

Parameters
stampThe timestamp for the event
anchorThe normalized pinch center
angleThe initial finger angle

◆ SpinEvent() [3/3]

cugl::SpinEvent::SpinEvent ( const SpinEvent event)
inline

Constructs a new pinch event that is a copy of the given one

Parameters
eventThe event to copy

Member Function Documentation

◆ clear()

void cugl::SpinEvent::clear ( )
inline

Clears the contents of this spin event

Member Data Documentation

◆ anchor

Vec2 cugl::SpinEvent::anchor

The normalized center of this pinch

◆ currAngle

float cugl::SpinEvent::currAngle

The current angle of the spin

◆ delta

float cugl::SpinEvent::delta

The rotation delta since the last animation frame

◆ now

Timestamp cugl::SpinEvent::now

The current time of the gesture

◆ origAngle

float cugl::SpinEvent::origAngle

The initial angle of the spin

◆ start

Timestamp cugl::SpinEvent::start

The starting time of the gesture


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