RRPlaneCollider

Objective-C

@interface RRPlaneCollider : RRCollider

Swift

class RRPlaneCollider : RRCollider

This collider detects hits on a plane that is positioned in the XY plane.

  • Initializer of the collider provided the plane region in the XY plane

    Declaration

    Objective-C

    - (nonnull instancetype)initWithRegion:(CGRect)region;

    Swift

    init(region: CGRect)

    Parameters

    region

    The rectangular region of the plane defined in the XY plane. Z is always 0.

  • Setter for the mask property, which is a binary image, interpreted as a texture on the plane which is used to determine if an intersected position on the plane should lead to a detected hit,

    Declaration

    Objective-C

    - (void)setMask:(nonnull RRImage *)mask;

    Swift

    func setMask(_ mask: RRImage)
  • Resets the mask image

    Declaration

    Objective-C

    - (void)resetMask;

    Swift

    func resetMask()
  • Redefines the plane region in XY plane

    Declaration

    Objective-C

    - (void)resize:(CGRect)region;

    Swift

    func resize(_ region: CGRect)

    Parameters

    region

    The rectangular region of the plane defined in the XY plane. Z is always 0.