/** * Sets the scale type * @param s new scale type * @return the scale type. */ protected Projector setScale(AxisScale s) { if(s.isLog() && !(_v0==0.0 && _v1==0.0)) Check.argument(_v0>0 && _v1>0,"LOG scale: v0<=0 or v1<=0"); _scaleType = s; computeShiftsAndScales(); return this; }
/** * Constructs a projector with specified v and u values. The * parameters u0 and u1 determine the margins of the projector. * The world coordinate v0 corresponds to normalized coordinate u0; * the world coordinate v1 corresponds to normalized coordinate u1. * @param v0 the v coordinate that corresponds to u coordinate u0; * v0 != v1 is required. * @param v1 the v coordinate that corresponds to u coordinate u1; * v0 != v1 is required. * @param u0 the u coordinate closest to normalized coordinate 0; * 0.0 <= u0 < u1 is required. * @param u1 the u coordinate closest to normalized coordinate 1; * u0 < u1 <= 1.0 is required. * @param s the AxisScale type of this projector */ public Projector(double v0, double v1, double u0, double u1, AxisScale s) { Check.argument(0.0<=u0,"0.0 <= u0"); Check.argument(u0<u1,"u0 < u1"); Check.argument(u1<=1.0,"u1 <= 1.0"); Check.argument(v0!=v1,"v0 != v1"); setScale(s); _u0 = u0; _u1 = u1; _v0 = v0; _v1 = v1; _scaleType = s; computeShiftsAndScales(); }