Banuba SDK
Instance Methods | Class Methods | List of all members
BNBTransformation Class Reference

#import <BNBTransformation.h>

Inheritance diagram for BNBTransformation:

Instance Methods

(nullable BNBTransformation *) - chainRight:
 Applies transform t after this e.g. More...
 
(nonnull BNBPoint2d *) - transformPoint:
 Apply transform to point. More...
 
(nonnull BNBPixelRect *) - transformRect:
 
(BOOL) - equals:
 
(nullable BNBTransformation *) - inverseJ
 Get the inverse of the transformation. More...
 
(nullable BNBTransformation *) - cloneJ
 Clone the transformation. More...
 
(nonnull NSArray< NSNumber * > *) - getMatJ
 Returns 3x3 row-maj transform matrix. More...
 

Class Methods

(nullable BNBTransformation *) + makeIdentity
 Constructs identity transform. More...
 
(nullable BNBTransformation *) + makeData:
 Constructs from mat_t. More...
 
(nullable BNBTransformation *) + makeRot:
 Constructs rotate transformation. More...
 
(nullable BNBTransformation *) + makeAffine:scaleY:tX:tY:rot:flipX:flipY:
 Constructs affine transformation. More...
 
(nullable BNBTransformation *) + makeRects:targetRect:rot:flipX:flipY:
 Constructs transformation from source to target rectangle Rotation and flips are around rectangles' center. More...
 

Detailed Description

Definition at line 11 of file BNBTransformation.h.

Method Documentation

◆ chainRight:

- (nullable BNBTransformation *) chainRight: (nullable BNBTransformation *)  t

Applies transform t after this e.g.

{rotate >> translate;} rotates first: (initial -> rotated) >> (rotated -> translated) = (initial -> translated)

◆ cloneJ

- (nullable BNBTransformation *) cloneJ

Clone the transformation.

◆ equals:

- (BOOL) equals: (nullable BNBTransformation *)  t

◆ getMatJ

- (nonnull NSArray<NSNumber *> *) getMatJ

Returns 3x3 row-maj transform matrix.

◆ inverseJ

- (nullable BNBTransformation *) inverseJ

Get the inverse of the transformation.

Exceptions
std::logic_errorwhen matrix is singular

◆ makeAffine:scaleY:tX:tY:rot:flipX:flipY:

+ (nullable BNBTransformation *) makeAffine: (float)  scaleX
scaleY: (float)  scaleY
tX: (float)  tX
tY: (float)  tY
rot: (BNBRotation)  rot
flipX: (BOOL)  flipX
flipY: (BOOL)  flipY 

Constructs affine transformation.

◆ makeData:

+ (nullable BNBTransformation *) makeData: (nonnull NSArray< NSNumber * > *)  mat

Constructs from mat_t.

◆ makeIdentity

+ (nullable BNBTransformation *) makeIdentity

Constructs identity transform.

◆ makeRects:targetRect:rot:flipX:flipY:

+ (nullable BNBTransformation *) makeRects: (nonnull BNBPixelRect *)  sourceRect
targetRect: (nonnull BNBPixelRect *)  targetRect
rot: (BNBRotation)  rot
flipX: (BOOL)  flipX
flipY: (BOOL)  flipY 

Constructs transformation from source to target rectangle Rotation and flips are around rectangles' center.

◆ makeRot:

+ (nullable BNBTransformation *) makeRot: (BNBRotation)  rot

Constructs rotate transformation.

◆ transformPoint:

- (nonnull BNBPoint2d *) transformPoint: (nonnull BNBPoint2d *)  p

Apply transform to point.

◆ transformRect:

- (nonnull BNBPixelRect *) transformRect: (nonnull BNBPixelRect *)  rect

The documentation for this class was generated from the following file: