Banuba SDK
libs
djinni
generated
objc
BNBTransformation.h
Go to the documentation of this file.
1
// AUTOGENERATED FILE - DO NOT MODIFY!
2
// This file 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
@interface
BNBTransformation
: NSObject
12
13
/** Constructs identity transform */
14
+ (nullable
BNBTransformation
*)
makeIdentity
;
15
16
/** Constructs from mat_t */
17
+ (nullable
BNBTransformation
*)makeData:(nonnull NSArray<NSNumber *> *)mat;
18
19
/** Constructs rotate transformation */
20
+ (nullable
BNBTransformation
*)makeRot:(BNBRotation)rot;
21
22
/** Constructs affine transformation */
23
+ (nullable
BNBTransformation
*)makeAffine:(
float
)scaleX
24
scaleY:(
float
)scaleY
25
tX:(
float
)tX
26
tY:(
float
)tY
27
rot:(BNBRotation)rot
28
flipX:(BOOL)flipX
29
flipY:(BOOL)flipY;
30
31
/**
32
* Constructs transformation from source to target rectangle
33
* Rotation and flips are around rectangles' center
34
*/
35
+ (nullable
BNBTransformation
*)makeRects:(nonnull
BNBPixelRect
*)sourceRect
36
targetRect:(nonnull
BNBPixelRect
*)targetRect
37
rot:(BNBRotation)rot
38
flipX:(BOOL)flipX
39
flipY:(BOOL)flipY;
40
41
/**
42
* Applies transform t after this
43
* e.g. {rotate >> translate;} rotates first: (initial -> rotated) >> (rotated -> translated) = (initial -> translated)
44
*/
45
- (nullable
BNBTransformation
*)chainRight:(nullable
BNBTransformation
*)t;
46
47
/** Apply transform to point */
48
- (nonnull
BNBPoint2d
*)transformPoint:(nonnull
BNBPoint2d
*)p;
49
50
- (nonnull
BNBPixelRect
*)transformRect:(nonnull
BNBPixelRect
*)rect;
51
52
- (BOOL)equals:(nullable
BNBTransformation
*)t;
53
54
/**
55
* Get the inverse of the transformation
56
* @throw std::logic_error when matrix is singular
57
*/
58
- (nullable
BNBTransformation
*)
inverseJ
;
59
60
/** Clone the transformation */
61
- (nullable
BNBTransformation
*)
cloneJ
;
62
63
/** Returns 3x3 row-maj transform matrix */
64
- (nonnull NSArray<NSNumber *> *)
getMatJ
;
65
66
@end
+[BNBTransformation makeIdentity]
nullable BNBTransformation * makeIdentity()
Constructs identity transform.
BNBTransformation
Definition:
BNBTransformation.h:12
BNBRotation.h
BNBPoint2d.h
BNBPixelRect
Definition:
BNBPixelRect.h:7
-[BNBTransformation getMatJ]
nonnull NSArray< NSNumber * > * getMatJ()
Returns 3x3 row-maj transform matrix.
BNBPixelRect.h
BNBPoint2d
Definition:
BNBPoint2d.h:7
-[BNBTransformation cloneJ]
nullable BNBTransformation * cloneJ()
Clone the transformation.
-[BNBTransformation inverseJ]
nullable BNBTransformation * inverseJ()
Get the inverse of the transformation.
Generated by
1.8.20