SGARResponder


Defines the protocol for objects to respond to gesture and touch events created in the SGARView.

Extends Protocol: NSObject
Declared In: SGARResponder.h

Discussion

There are essentially two different enviornments where touch evenets can be generated, the augmented reality enviornment and the normal UIResponder chain. In order to loop in the AR envoirnment with the UIResponder chain, pre-calculations of touch events need to be acknowledged by the the AR view before they can be released onto the normal UIResponder chain. This protocol attempts to provides callback notifications when gestures are created within the AR envoirnment.

SGARResponders are registered with SGARView via addResponder:.



Methods

-ARDoubleTap:

Notifies the reciever when a double touch event has occurred.

-ARMoveEndedAtPoint:

Notifies the reicever when a drag events finishs.

-ARMoveFromPoint:toPoint:

Notifies the reciever when a drag event occurs.

-ARPinchAtPoint:andPoint:withDistance:

Notifies the reciever when a pinch event occurs.

-ARPullAtPoint:andPoint:withDistance:

Notifies the reciever when a pull event occurs.

-ARSingleTap:

Notifies the reciever when a single touch event has occurred.

-ARSingleTapAtPoint:andPoint:

Notifies the reciever when a single touch event occurs at two points.

-ARViewDidShake

Notifies the reciever when the view is shaken.


ARDoubleTap:


Notifies the reciever when a double touch event has occurred.

- (void) ARDoubleTap:(CGPoint)point; 
Parameters
point

The point at which the touch event occurred.


ARMoveEndedAtPoint:


Notifies the reicever when a drag events finishs.

- (void) ARMoveEndedAtPoint:(CGPoint)point; 
Parameters
point

The point at which the drag event was completed.


ARMoveFromPoint:toPoint:


Notifies the reciever when a drag event occurs.

- (void) ARMoveFromPoint:(CGPoint)fromPoint toPoint:(CGPoint)toPoint; 
Parameters
fromPoint

The start point of the drag.

toPoint

The end point of the drag.


ARPinchAtPoint:andPoint:withDistance:


Notifies the reciever when a pinch event occurs.

- (void) ARPinchAtPoint:(CGPoint)pointOne andPoint:(CGPoint)pointTwo 
        withDistance:(CGFloat)distance; 
Parameters
pointOne

One of the two points at which the touch event occurred.

pointTwo

The other point at which the touch event occurred.

distance

The distance between the two points. Why? For convience.


ARPullAtPoint:andPoint:withDistance:


Notifies the reciever when a pull event occurs.

- (void) ARPullAtPoint:(CGPoint)pointOne andPoint:(CGPoint)pointTwo 
        withDistance:(CGFloat)distance; 
Parameters
pointOne

One of the two points at which the touch event occurred.

pointTwo

The other point at which the touch event occurred.

distance

The distance between the two points. Why? Because I can.


ARSingleTap:


Notifies the reciever when a single touch event has occurred.

- (void) ARSingleTap:(CGPoint)point; 
Parameters
point

The point at which the touch event occurred.


ARSingleTapAtPoint:andPoint:


Notifies the reciever when a single touch event occurs at two points.

- (void) ARSingleTapAtPoint:(CGPoint)pointOne andPoint:(CGPoint)pointTwo; 
Parameters
pointOne

One of the two points at which the touch event occurred.

pointTwo

The other point at which the touch event occurred.


ARViewDidShake


Notifies the reciever when the view is shaken.

- (void) ARViewDidShake; 

© SimpleGeo Last Updated: 03/31/2010