Quadpublic class Quad extends Object
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 |
Methods Summary |
---|
public boolean | IsInUnitRange()
return p0.IsInUnitRange() &&
p1.IsInUnitRange() &&
p2.IsInUnitRange() &&
p3.IsInUnitRange();
| public Rectangle | boundingBox()
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 float | getBoundingHeight()
List<Float> ys = Arrays.asList(p0.y, p1.y, p2.y, p3.y);
return Collections.max(ys) - Collections.min(ys);
| public float | getBoundingWidth()
List<Float> xs = Arrays.asList(p0.x, p1.x, p2.x, p3.x);
return Collections.max(xs) - Collections.min(xs);
| public android.filterfw.geometry.Quad | scaled(float s)
return new Quad(p0.times(s), p1.times(s), p2.times(s), p3.times(s));
| public android.filterfw.geometry.Quad | scaled(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.String | toString()
return "{" + p0 + ", " + p1 + ", " + p2 + ", " + p3 + "}";
| public android.filterfw.geometry.Quad | translated(android.filterfw.geometry.Point t)
return new Quad(p0.plus(t), p1.plus(t), p2.plus(t), p3.plus(t));
| public android.filterfw.geometry.Quad | translated(float x, float y)
return new Quad(p0.plus(x, y), p1.plus(x, y), p2.plus(x, y), p3.plus(x, y));
|
|