Inherits from NSObject
Declared in AROverlayUtil.h
AROverlayUtil.m

Tasks

Class Methods

boundingFrameForPoints:

The set of AROverlayPoint objects that you want to find a bounding rectangle for.

+ (CGRect)boundingFrameForPoints:(NSArray *)points

Parameters

points

The set of AROverlayPoint objects that you want to find a bounding rectangle for.

Return Value

The minimum bounding frame needed to hold all the points when transformed.

Declared In

AROverlayUtil.h

rectToQuad:quadTLX:quadTLY:quadTRX:quadTRY:quadBLX:quadBLY:quadBRX:quadBRY:

Creates a CATransform3D for fitting a CALayer to any quadrilateral. This basically allows you to say “fit this UIView into the shape defined by these four points.” Used for many of our overlays.

+ (CATransform3D)rectToQuad:(CGRect)rect quadTLX:(double)x1a quadTLY:(double)y1a quadTRX:(double)x2a quadTRY:(double)y2a quadBLX:(double)x3a quadBLY:(double)y3a quadBRX:(double)x4a quadBRY:(double)y4a

Parameters

rect

The bounding rectangle of the view.

x1a

The x-coordinate of the first corner

y1a

The y-coordinate of the first corner

x2a

The x-coordinate of the second corner

y2a

The y-coordinate of the second corner

x3a

The x-coordinate of the third corner

y3a

The y-coordinate of the third corner

x4a

The x-coordinate of the fourth corner

y4a

The y-coordinate of the fourth corner

Return Value

A CATransform3D object for reshaping rect to fit within the quadrilateral defined by the other parameters.

Discussion

Creates a CATransform3D for fitting a CALayer to any quadrilateral. This basically allows you to say “fit this UIView into the shape defined by these four points.” Used for many of our overlays.

Declared In

AROverlayUtil.h