Interface Transformation

    • 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)
      • transformPoint

        @NonNull
        Point2d transformPoint​(@NonNull
                               Point2d p)
        Apply transform to point
      • inverseJ

        @Nullable
        Transformation inverseJ()
        Get the inverse of 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