CUGL 2.3
Cornell University Game Library
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
cugl::PanEvent Class Reference

#include <CUPanGesture.h>

Public Member Functions

 PanEvent ()
 
 PanEvent (const Timestamp &start, const Vec2 position, Uint32 fingers)
 
 PanEvent (const PanEvent &event)
 
void clear ()
 

Public Attributes

Timestamp start
 
Timestamp now
 
Vec2 origPosition
 
Vec2 currPosition
 
Vec2 delta
 
Uint32 fingers
 

Detailed Description

This simple class is a struct to hold a pan event.

A pan 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

◆ PanEvent() [1/3]

cugl::PanEvent::PanEvent ( )
inline

Constructs a new pan event with the default values

◆ PanEvent() [2/3]

cugl::PanEvent::PanEvent ( const Timestamp start,
const Vec2  position,
Uint32  fingers 
)
inline

Constructs a new pan event with the given values

Parameters
startThe initial timestamp
positionThe starting location
fingersThe number of fingers uses

◆ PanEvent() [3/3]

cugl::PanEvent::PanEvent ( const PanEvent event)
inline

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

Parameters
eventThe event to copy

Member Function Documentation

◆ clear()

void cugl::PanEvent::clear ( )
inline

Clears the contents of this pan event

Member Data Documentation

◆ currPosition

Vec2 cugl::PanEvent::currPosition

The current position of the pan

◆ delta

Vec2 cugl::PanEvent::delta

The change since the last generated event

◆ fingers

Uint32 cugl::PanEvent::fingers

The number of fingers involved in this pan

◆ now

Timestamp cugl::PanEvent::now

The current time of the gesture

◆ origPosition

Vec2 cugl::PanEvent::origPosition

The initial position of the pan

◆ start

Timestamp cugl::PanEvent::start

The starting time of the gesture


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