Class

SKRegion

The definition of an arbitrary area.

Declaration

@interface SKRegion : NSObject

Overview

An SKRegion object defines a mathematical shape and is typically used to determine whether a particular point lies inside this area. For example, regions are used to define the area that a physics field can affect. Regions are defined using paths and mathematical shapes and can also be combined using constructive solid geometry.

Topics

Creating and Initializing Region Objects

+ infiniteRegion

Returns a region that defines a region that includes all points.

- initWithSize:

Initializes a new region with a rectangular area.

- initWithRadius:

Initializes a new region with a circular area.

- initWithPath:

Initializes a new region using a Core Graphics path.

- inverseRegion

Returns a new region that is the mathematical inverse of an existing region.

- regionByDifferenceFromRegion:

Returns a new region created by subtracting the contents of another region from this region.

- regionByIntersectionWithRegion:

Returns a new region created by intersecting the contents of this region with another region.

- regionByUnionWithRegion:

Returns a new region created by combining the contents of this region with another region.

Interacting with a Region

path

Returns a Core Graphics path that defines the region.

- containsPoint:

Returns a Boolean value that indicates whether a particular point is contained in the region.

Relationships

Inherits From

See Also

Mathematical Tools

SKKeyframeSequence

An object that performs interpolation between values specified at different times (keyframes).

SKRange

A definition of a range of floating-point values.