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
All Methods Static Methods Instance Methods Abstract Methods 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 Detail
-
chainRight
@Nullable Transformation chainRight(@Nullable Transformation t)
Applies transform t after this e.g. {rotate >> translate;} rotates first: (initial -> rotated) >> (rotated -> translated) = (initial -> translated)
-
equals
boolean equals(@Nullable Transformation t)
-
inverseJ
@Nullable Transformation inverseJ()
Get the inverse of the transformation
-
cloneJ
@Nullable Transformation cloneJ()
Clone the transformation
-
getMatJ
@NonNull java.util.ArrayList<java.lang.Float> getMatJ()
Returns 3x3 row-maj transform matrix
-
makeIdentity
@Nullable static Transformation makeIdentity()
Constructs identity transform
-
makeData
@Nullable static Transformation makeData(@NonNull java.util.ArrayList<java.lang.Float> mat)
Constructs from mat_t
-
makeRot
@Nullable static Transformation makeRot(@NonNull Rotation rot)
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
-
-