co.uk.sentinelweb.views.draw.util
Class PointUtil

java.lang.Object
  extended by co.uk.sentinelweb.views.draw.util.PointUtil

public class PointUtil
extends java.lang.Object


Field Summary
static float PI
           
 
Constructor Summary
PointUtil()
           
 
Method Summary
static void addMatrix(java.util.Vector<PointF> pin, PointF matrix)
           
static void addVector(PointF pin, PointF pout, PointF vec)
           
static void applyRotation(PointF input, PointF output, double[][] matrix, PointF trans)
           
static float calcAngle(PointF p1, PointF p2, PointF p3)
           
static float calcAngle2PI(PointF p1, PointF p2, PointF p3)
           
static boolean checkBounds(RectF r, PointF p)
           
static boolean checkBounds(RectF r, RectF tst)
           
static boolean checkBounds2(RectF r, PointF p)
           
static float dist(PointF chk, PointF tgt)
           
static float getMean(float[] arr, int ctr)
           
static float getMedian(float[] arr, int ctr)
           
static float getMidpoint(float[] arr, float factor)
           
static PointF midpoint(PointF p1, PointF p2)
           
static PointF midpoint(RectF r)
           
 void mul3(PointF pin, PointF pout, double[][] m)
           
static double[][] mulMatrix(double[][] matrixA, double[][] matrixB, double[][] matrixOut)
           
static void mulMatrix(PointF pin, PointF pout, double[][] matrix)
           
static void mulVector(PointF pin, PointF pout, float scalar)
           
static void mulVector(PointF pin, PointF pout, PointF vec)
           
static float norm(PointF p)
           
static void scale(RectF r, float factor)
           
static void setRectFromRect(RectF dst, Rect src)
           
static void setRectFromRectF(Rect dst, RectF src)
           
static void subVector(PointF pin, PointF pout, PointF vec)
           
static java.lang.String tostr(PointF pt)
           
static java.lang.String tostr(Rect r)
           
static java.lang.String tostr(RectF r)
           
static void translate(RectF r, PointF trans, float transFactor)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PI

public static float PI
Constructor Detail

PointUtil

public PointUtil()
Method Detail

getMedian

public static float getMedian(float[] arr,
                              int ctr)

getMean

public static float getMean(float[] arr,
                            int ctr)

getMidpoint

public static float getMidpoint(float[] arr,
                                float factor)

mulMatrix

public static double[][] mulMatrix(double[][] matrixA,
                                   double[][] matrixB,
                                   double[][] matrixOut)

mulMatrix

public static void mulMatrix(PointF pin,
                             PointF pout,
                             double[][] matrix)

addVector

public static void addVector(PointF pin,
                             PointF pout,
                             PointF vec)

subVector

public static void subVector(PointF pin,
                             PointF pout,
                             PointF vec)

mulVector

public static void mulVector(PointF pin,
                             PointF pout,
                             float scalar)

mulVector

public static void mulVector(PointF pin,
                             PointF pout,
                             PointF vec)

addMatrix

public static void addMatrix(java.util.Vector<PointF> pin,
                             PointF matrix)

applyRotation

public static void applyRotation(PointF input,
                                 PointF output,
                                 double[][] matrix,
                                 PointF trans)

mul3

public void mul3(PointF pin,
                 PointF pout,
                 double[][] m)

checkBounds

public static boolean checkBounds(RectF r,
                                  PointF p)

checkBounds

public static boolean checkBounds(RectF r,
                                  RectF tst)

checkBounds2

public static boolean checkBounds2(RectF r,
                                   PointF p)

norm

public static float norm(PointF p)

calcAngle

public static float calcAngle(PointF p1,
                              PointF p2,
                              PointF p3)

calcAngle2PI

public static float calcAngle2PI(PointF p1,
                                 PointF p2,
                                 PointF p3)

dist

public static float dist(PointF chk,
                         PointF tgt)

scale

public static void scale(RectF r,
                         float factor)

translate

public static void translate(RectF r,
                             PointF trans,
                             float transFactor)

setRectFromRectF

public static void setRectFromRectF(Rect dst,
                                    RectF src)

setRectFromRect

public static void setRectFromRect(RectF dst,
                                   Rect src)

midpoint

public static PointF midpoint(RectF r)

midpoint

public static PointF midpoint(PointF p1,
                              PointF p2)

tostr

public static java.lang.String tostr(RectF r)

tostr

public static java.lang.String tostr(Rect r)

tostr

public static java.lang.String tostr(PointF pt)