Package com.banuba.sdk.types
Interface Transformation
- All Known Implementing Classes:
Transformation.CppProxy
public interface Transformation
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Transformation.CppProxy
-
Method Summary
Modifier and Type Method Description Transformation
chainRight(Transformation t)
Applies transform t after this e.g.Transformation
cloneJ()
Clone the transformationboolean
equals(Transformation t)
java.util.ArrayList<java.lang.Float>
getMatJ()
Returns 3x3 row-maj transform matrixTransformation
inverseJ()
Get the inverse of the transformationstatic Transformation
makeAffine(float scaleX, float scaleY, float tX, float tY, Rotation rot, boolean flipX, boolean flipY)
Constructs affine transformationstatic Transformation
makeData(java.util.ArrayList<java.lang.Float> mat)
Constructs from mat_tstatic Transformation
makeIdentity()
Constructs identity transformstatic Transformation
makeRects(PixelRect sourceRect, PixelRect targetRect, Rotation rot, boolean flipX, boolean flipY)
Constructs transformation from source to target rectangle Rotation and flips are around rectangles' centerstatic Transformation
makeRot(Rotation rot)
Constructs rotate transformationPoint2d
transformPoint(Point2d p)
Apply transform to pointPixelRect
transformRect(PixelRect rect)
-
Method Details
-
chainRight
Applies transform t after this e.g. {rotate >> translate;} rotates first: (initial -> rotated) >> (rotated -> translated) = (initial -> translated) -
transformPoint
Apply transform to point -
transformRect
-
equals
-
inverseJ
Get the inverse of the transformation -
cloneJ
Clone the transformation -
getMatJ
@NonNull java.util.ArrayList<java.lang.Float> getMatJ()Returns 3x3 row-maj transform matrix -
makeIdentity
Constructs identity transform -
makeData
Constructs from mat_t -
makeRot
Constructs rotate transformation -
makeAffine
@Nullable static Transformation makeAffine(float scaleX, float scaleY, float tX, float tY, @NonNull Rotation rot, boolean flipX, boolean flipY)Constructs affine transformation -
makeRects
@Nullable static Transformation makeRects(@NonNull PixelRect sourceRect, @NonNull PixelRect targetRect, @NonNull Rotation rot, boolean flipX, boolean flipY)Constructs transformation from source to target rectangle Rotation and flips are around rectangles' center
-