Banuba SDK
BNBTransformation.h
Go to the documentation of this file.
1 // AUTOGENERATED FILE - DO NOT MODIFY!
2 // This file was generated by Djinni from types.djinni
3 
4 #import "BNBPixelRect.h"
5 #import "BNBPoint2d.h"
6 #import "BNBRotation.h"
7 #import <Foundation/Foundation.h>
8 @class BNBTransformation;
9 
10 
11 
12 #ifndef DJINNI_EXPORT
13  #define DJINNI_EXPORT __attribute__((__visibility__("default")))
14 #endif
15 
17 @interface BNBTransformation : NSObject
18 
19 /** Constructs identity transform */
20 + (nullable BNBTransformation *)makeIdentity;
21 
22 /** Constructs from mat_t */
23 + (nullable BNBTransformation *)makeData:(nonnull NSArray<NSNumber *> *)mat;
24 
25 /** Constructs rotate transformation */
26 + (nullable BNBTransformation *)makeRot:(BNBRotation)rot;
27 
28 /** Constructs affine transformation */
29 + (nullable BNBTransformation *)makeAffine:(float)scaleX
30  scaleY:(float)scaleY
31  tX:(float)tX
32  tY:(float)tY
33  rot:(BNBRotation)rot
34  flipX:(BOOL)flipX
35  flipY:(BOOL)flipY;
36 
37 /**
38  * Constructs transformation from source to target rectangle
39  * Rotation and flips are around rectangles' center
40  */
41 + (nullable BNBTransformation *)makeRects:(nonnull BNBPixelRect *)sourceRect
42  targetRect:(nonnull BNBPixelRect *)targetRect
43  rot:(BNBRotation)rot
44  flipX:(BOOL)flipX
45  flipY:(BOOL)flipY;
46 
47 /**
48  * Applies transform t after this
49  * e.g. {rotate >> translate;} rotates first: (initial -> rotated) >> (rotated -> translated) = (initial -> translated)
50  */
51 - (nullable BNBTransformation *)chainRight:(nullable BNBTransformation *)t;
52 
53 /** Apply transform to point */
54 - (nonnull BNBPoint2d *)transformPoint:(nonnull BNBPoint2d *)p;
55 
56 - (nonnull BNBPixelRect *)transformRect:(nonnull BNBPixelRect *)rect;
57 
58 - (BOOL)equals:(nullable BNBTransformation *)t;
59 
60 /**
61  * Get the inverse of the transformation
62  * @throw std::logic_error when matrix is singular
63  */
64 - (nullable BNBTransformation *)inverseJ;
65 
66 /** Clone the transformation */
67 - (nullable BNBTransformation *)cloneJ;
68 
69 /** Returns 3x3 row-maj transform matrix */
70 - (nonnull NSArray<NSNumber *> *)getMatJ;
71 
72 @end
+[BNBTransformation makeIdentity]
nullable BNBTransformation * makeIdentity()
Constructs identity transform.
BNBTransformation
Definition: BNBTransformation.h:17
BNBRotation.h
BNBPoint2d.h
BNBPixelRect
Definition: BNBPixelRect.h:12
-[BNBTransformation getMatJ]
nonnull NSArray< NSNumber * > * getMatJ()
Returns 3x3 row-maj transform matrix.
BNBPixelRect.h
DJINNI_EXPORT
#define DJINNI_EXPORT
for order of values in action units array see action_units_indices enum
Definition: BNBActionUnits.h:9
BNBPoint2d
Definition: BNBPoint2d.h:12
-[BNBTransformation cloneJ]
nullable BNBTransformation * cloneJ()
Clone the transformation.
-[BNBTransformation inverseJ]
nullable BNBTransformation * inverseJ()
Get the inverse of the transformation.