HERE iOS SDK Developer's Guide

<NMAARControllerGestureDelegate>

Protocol Summary

protocol <NMAARControllerGestureDelegate>

Derived from: <NSObject>

A delegate protocol for handling LiveSight camera view gesture events.

Include: NMAKit.framework/headers/NMAARController.h

Inheritance Diagrams

Figure 1. Public inheritance diagram for <NMAARControllerGestureDelegate> – <NMAARControllerGestureDelegate>

[For complete information, see the section Protocol Details]

Instance Method Summary

Table 1. Instance Methods
Instance Method Summary

- @optional (BOOL) arController:( NMAARController *) arController shouldProcessPanFromPoint:(CGPoint) fromPoint toPoint:(CGPoint) toPoint

Called when a pan gesture occurs in the associated NMACompositeView

- @optional (BOOL) arController:( NMAARController *) arController shouldProcessTapAtPoint:(CGPoint) point

Called when a tap gesture occurs in the associated NMACompositeView

- @optional (BOOL) arController:( NMAARController *) arController shouldProcessTouchDownAtPoint:(CGPoint) point

Called when a touch down event occurs in the associated NMACompositeView

- @optional (BOOL) arController:( NMAARController *) arController shouldProcessTouchUpAtPoint:(CGPoint) point

Called when a touch up event occurs in the associated NMACompositeView

- @optional (BOOL) arController:( NMAARController *) arController shouldProcessTouchUpOnObjects:(NSArray *) objects atPoint:(CGPoint) point

Called when a touch up event occurs in the associated NMACompositeView

Protocol Details

A delegate protocol for handling LiveSight camera view gesture events.

To support default object press/unpress rendering and custom actions when a touch up occurs on an object simply override arController:shouldProcessTouchUpOnObjects:atPoint:. The remaining callbacks of this protocol are for more advanced gesture control.

Note:

Methods of this protocol are called on the main queue.

Instance Method Details

- @optional (BOOL) arController:( NMAARController *) arController shouldProcessPanFromPoint:(CGPoint) fromPoint toPoint:(CGPoint) toPoint

Called when a pan gesture occurs in the associated NMACompositeView.

If YES is returned, or if this delegate method is not implemented, then pan gestures will be handled using the default behaviour.

For NMAARProjectionTypeNearFar, performing a pan gesture has the visual effect of moving objects between the back plane and the front plane. In reality, the gesture is actually just changing the geo coordinates that define the boundary between the two planes and hence changing the definition of which objects are considered "near" and "far".

Parameters:

  • arController

    The NMAARController instance sending the callback.

  • fromPoint

    The start point of the pan gesture.

  • toPoint

    The end point of the pan gesture.

Returns:

NO if the pan event is NOT to be processed by NMAARController (this will disable the default behaviour described above).

- @optional (BOOL) arController:( NMAARController *) arController shouldProcessTapAtPoint:(CGPoint) point

Called when a tap gesture occurs in the associated NMACompositeView.

Currently no default action is performed on a tap event. However, if you implement this method it is recommended to return NO to override any default tap handling that may be introduced in the future.

Parameters:

  • arController

    The NMAARController instance sending the callback.

  • point

    The point at which the touch occurred.

Returns:

NO if the touch event is NOT to be processed by NMAARController.

- @optional (BOOL) arController:( NMAARController *) arController shouldProcessTouchDownAtPoint:(CGPoint) point

Called when a touch down event occurs in the associated NMACompositeView.

If YES is returned, or if this delegate method is not implemented, then the object closest to the touch point will be rendered as pressed.

Parameters:

  • arController

    The NMAARController instance sending the callback.

  • point

    The point at which the touch down occurred.

Returns:

NO if the touch event is NOT to be processed by NMAARController (this will disable the default behaviour described above).

- @optional (BOOL) arController:( NMAARController *) arController shouldProcessTouchUpAtPoint:(CGPoint) point

Called when a touch up event occurs in the associated NMACompositeView.

Any object previously rendered as pressed by NMAARController will be rendered unpressed on a touch up event.

Parameters:

  • arController

    The NMAARController instance sending the callback.

  • point

    The point at which the touch up occurred.

Returns:

NO if the touch event is NOT to be processed by NMAARController (this will prevent object selection on touch up and prevent arController:shouldProcessTouchUpOnObjects:atPoint: from being called.

- @optional (BOOL) arController:( NMAARController *) arController shouldProcessTouchUpOnObjects:(NSArray *) objects atPoint:(CGPoint) point

Called when a touch up event occurs in the associated NMACompositeView.

If YES is returned, or if this delegate method is not implemented, then the object closest to the touch point will be selected if the preceding touch down occured on that object.

Note:

This delegate method will not be called if the delegate method arController:shouldProcessTouchDownAtPoint: returns NO.

Parameters:

  • arController

    The NMAARController instance sending the callback.

  • objects

    An array of NMAARObjects located at the touch point.

  • point

    The point at which the touch up occurred.

Returns:

NO if the touch event is NOT to be processed by NMAARController (this will disable the default behaviour described above).