|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.neu.ccs.gui.Transform1D
A 1-dimensional transform class for simple affine scaling and for working with the components of a rectilinear 2-dimensional affine transform.
The transform has the form z --> factor * z + offset.
AffineTransform,
Serialized Form| Field Summary | |
protected double |
factor
The scale factor for this transform. |
protected double |
offset
The offset for this transform. |
| Constructor Summary | |
Transform1D()
Constructs a transform object representing the identity transform. |
|
Transform1D(double f,
double o)
Constructs a transform object with the given scale factor and offset. |
|
Transform1D(double a1,
double a2,
double b1,
double b2)
Constructs a transform object mapping the interval [a1, a2] to the interval [b1, b2]. |
|
| Method Summary | |
Transform1D |
createInverse()
Returns a transform representing the inverse of this transform. |
double |
getFactor()
Returns the scale factor for this transform. |
double |
getOffset()
Return the offset for this transform. |
boolean |
hasInverse()
Returns true if an inverse transform
exists for this transform, and false
if an inverse transform does not exist. |
double |
inverseTransform(double w)
Returns the result of applying the inverse of this transform to the given value. |
void |
setFactor(double f)
Sets the scale factor for this transform to the given value. |
void |
setOffset(double o)
Sets the offset for this transform to the given value. |
void |
setTransform(double f,
double o)
Sets the scale factor and offset for this transform to the given values. |
void |
setTransform(double a1,
double a2,
double b1,
double b2)
Sets the scale factor and offset for this transform so that it maps the interval [a1, a2] to the interval [b1, b2]. |
void |
setTransform(Transform1D other)
Sets the scale factor and offset for this transform to the scale factor and offset of the given transform. |
double |
transform(double z)
Returns the result of applying the transform to the given value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected double factor
protected double offset
| Constructor Detail |
public Transform1D()
Transform1D(double, double),
Transform1D(double, double, double, double)
public Transform1D(double f,
double o)
f - the scale factor for this transformo - the offset for this transformTransform1D(),
Transform1D(double, double, double, double),
setTransform(double, double)
public Transform1D(double a1,
double a2,
double b1,
double b2)
a1 - the first endpoint of the first intervala2 - the second endpoint of the first intervalb1 - the first endpoint of the second intervalb2 - the second endpoint of the second intervalTransform1D(),
Transform1D(double, double),
setTransform(double, double, double, double)| Method Detail |
public void setTransform(double f,
double o)
f - the new factoro - the new offsetTransform1D(double, double),
setTransform(double, double, double, double),
setTransform(Transform1D)
public void setTransform(double a1,
double a2,
double b1,
double b2)
a1 - the new first endpoint of the first intervala2 - the new second endpoint of the first intervalb1 - the new first endpoint of the second intervalb2 - the new second endpoint of the second intervalTransform1D(double, double, double, double),
setTransform(double, double),
setTransform(Transform1D)public void setTransform(Transform1D other)
setTransform(double, double),
setTransform(double, double, double, double)public void setFactor(double f)
f - the new factorsetTransform(double, double),
getFactor()public double getFactor()
setFactor(double),
getOffset()public void setOffset(double o)
o - the new offsetsetTransform(double, double),
getOffset()public double getOffset()
setOffset(double),
getFactor()public double transform(double z)
inverseTransform(double)public boolean hasInverse()
true if an inverse transform
exists for this transform, and false
if an inverse transform does not exist.
inverseTransform(double),
createInverse()
public double inverseTransform(double w)
throws NoninvertibleTransformException
NoninvertibleTransformException - if this transform cannot be invertedhasInverse(),
createInverse()
public Transform1D createInverse()
throws NoninvertibleTransformException
NoninvertibleTransformException - if this transform cannot be invertedhasInverse(),
inverseTransform(double)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||