FileDocCategorySizeDatePackage
Quad.javaAPI DocAndroid 5.1 API2648Thu Mar 12 22:22:30 GMT 2015android.filterfw.geometry

Quad

public class Quad extends Object
hide

Fields Summary
public android.filterfw.geometry.Point
p0
public android.filterfw.geometry.Point
p1
public android.filterfw.geometry.Point
p2
public android.filterfw.geometry.Point
p3
Constructors Summary
public Quad()

    
public Quad(android.filterfw.geometry.Point p0, android.filterfw.geometry.Point p1, android.filterfw.geometry.Point p2, android.filterfw.geometry.Point p3)

        this.p0 = p0;
        this.p1 = p1;
        this.p2 = p2;
        this.p3 = p3;
    
Methods Summary
public booleanIsInUnitRange()

        return p0.IsInUnitRange() &&
               p1.IsInUnitRange() &&
               p2.IsInUnitRange() &&
               p3.IsInUnitRange();
    
public RectangleboundingBox()

        List<Float> xs = Arrays.asList(p0.x, p1.x, p2.x, p3.x);
        List<Float> ys = Arrays.asList(p0.y, p1.y, p2.y, p3.y);
        float x0 = Collections.min(xs);
        float y0 = Collections.min(ys);
        float x1 = Collections.max(xs);
        float y1 = Collections.max(ys);
        return new Rectangle(x0, y0, x1 - x0, y1 - y0);
    
public floatgetBoundingHeight()

        List<Float> ys = Arrays.asList(p0.y, p1.y, p2.y, p3.y);
        return Collections.max(ys) - Collections.min(ys);
    
public floatgetBoundingWidth()

        List<Float> xs = Arrays.asList(p0.x, p1.x, p2.x, p3.x);
        return Collections.max(xs) - Collections.min(xs);
    
public android.filterfw.geometry.Quadscaled(float s)

        return new Quad(p0.times(s), p1.times(s), p2.times(s), p3.times(s));
    
public android.filterfw.geometry.Quadscaled(float x, float y)

        return new Quad(p0.mult(x, y), p1.mult(x, y), p2.mult(x, y), p3.mult(x, y));
    
public java.lang.StringtoString()

        return "{" + p0 + ", " + p1 + ", " + p2 + ", " + p3 + "}";
    
public android.filterfw.geometry.Quadtranslated(android.filterfw.geometry.Point t)

        return new Quad(p0.plus(t), p1.plus(t), p2.plus(t), p3.plus(t));
    
public android.filterfw.geometry.Quadtranslated(float x, float y)

        return new Quad(p0.plus(x, y), p1.plus(x, y), p2.plus(x, y), p3.plus(x, y));