Banuba SDK
|
#import <BNBTransformation.h>
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... | |
Definition at line 11 of file BNBTransformation.h.
- (nullable BNBTransformation *) chainRight: | (nullable BNBTransformation *) | t |
Applies transform t after this e.g.
{rotate >> translate;} rotates first: (initial -> rotated) >> (rotated -> translated) = (initial -> translated)
- (nullable BNBTransformation *) cloneJ |
Clone the transformation.
- (BOOL) equals: | (nullable BNBTransformation *) | t |
- (nonnull NSArray<NSNumber *> *) getMatJ |
Returns 3x3 row-maj transform matrix.
- (nullable BNBTransformation *) inverseJ |
Get the inverse of the transformation.
std::logic_error | when matrix is singular |
+ (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.
+ (nullable BNBTransformation *) makeData: | (nonnull NSArray< NSNumber * > *) | mat |
Constructs from mat_t.
+ (nullable BNBTransformation *) makeIdentity |
Constructs identity transform.
+ (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.
+ (nullable BNBTransformation *) makeRot: | (BNBRotation) | rot |
Constructs rotate transformation.
- (nonnull BNBPoint2d *) transformPoint: | (nonnull BNBPoint2d *) | p |
Apply transform to point.
- (nonnull BNBPixelRect *) transformRect: | (nonnull BNBPixelRect *) | rect |