|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--drasys.or.geom.rect2.Transform
An implementation of 2-D homogeneous transformations.
References:
Computer Graphics : Principles and Practice (Systems Programming)
James D. Foley (Editor), et al; Hardcover
Constructor Summary | |
Transform()
The default transform matrix is the identity matrix. |
|
Transform(double r11,
double r12,
double r21,
double r22,
double tx,
double ty)
Sets the transform matrix directly from the arguments: [r11, r12, 0] [r21, r22, 0] [tx, ty, 1] |
|
Transform(PointI inPoint1,
PointI inPoint2,
PointI outPoint1,
PointI outPoint2)
Creates a transform that maps the two input points to the two output points using translation and scaling. |
|
Transform(PointI inPoint1,
PointI inPoint2,
PointI outPoint1,
PointI outPoint2,
boolean preserveAspectRatio)
Creates a transform that maps the two input points to the two output points using only translation and scaling. |
|
Transform(RangeI inRange,
RangeI outRange)
Creates a transform that maps the input range to the output range using translation and scaling. |
|
Transform(RangeI inRange,
RangeI outRange,
boolean preserveAspectRatio)
Creates a transform that maps the input range to the output range using translation and scaling. |
Method Summary | |
void |
combine(TransformI transform)
Includes the argument transform into this transform. |
PointI |
forward(PointI point)
Returns a point that is translated, scaled and rotated in the forward direction. |
RangeI |
forward(RangeI range)
Returns a range that is translated, scaled and rotated int the forward direction. |
PointI |
forwardTransform(PointI point)
Returns a transformed point. |
RangeI |
forwardTransform(RangeI range)
Returns a transformed range. |
CoordinateSystemI |
inputCoordinateSystem()
Always returns 'rect2.CoordinateSystem'; |
PointI |
inverse(PointI point)
Returns a point that is translated, scaled and rotated in the inverse direction. |
RangeI |
inverse(RangeI range)
Returns a range that is translated, scaled and rotated int the inverse direction. |
PointI |
inverseTransform(PointI point)
Returns an inverse transformed point. |
RangeI |
inverseTransform(RangeI range)
Returns an inverse transformed range. |
CoordinateSystemI |
outputCoordinateSystem()
Always returns 'rect2.CoordinateSystem'; |
double |
r11()
|
double |
r12()
|
double |
r21()
|
double |
r22()
|
void |
rotate(double angleInRadians)
Adds a rotation to the transformation. |
void |
scale(double scaleX,
double scaleY)
Adds a scaling to the transformation. |
void |
set(double r11,
double r12,
double r21,
double r22,
double tx,
double ty)
Sets the transformation matrix elements where the matrix is: [r11, r12, 0] [r21, r22, 0] [tx, ty, 1] |
java.lang.String |
toString()
|
void |
translate(double deltaX,
double deltaY)
Adds a translation to the transformation. |
double |
tx()
|
double |
ty()
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public Transform()
public Transform(double r11, double r12, double r21, double r22, double tx, double ty)
public Transform(RangeI inRange, RangeI outRange)
public Transform(RangeI inRange, RangeI outRange, boolean preserveAspectRatio)
public Transform(PointI inPoint1, PointI inPoint2, PointI outPoint1, PointI outPoint2)
public Transform(PointI inPoint1, PointI inPoint2, PointI outPoint1, PointI outPoint2, boolean preserveAspectRatio)
Method Detail |
public double tx()
public double ty()
public double r11()
public double r12()
public double r21()
public double r22()
public void set(double r11, double r12, double r21, double r22, double tx, double ty)
public void combine(TransformI transform)
public void translate(double deltaX, double deltaY)
public void scale(double scaleX, double scaleY)
public void rotate(double angleInRadians)
public PointI forward(PointI point) throws GeomException
public PointI inverse(PointI point) throws GeomException
public RangeI forward(RangeI range) throws GeomException
public RangeI inverse(RangeI range) throws GeomException
public java.lang.String toString()
public CoordinateSystemI inputCoordinateSystem()
public CoordinateSystemI outputCoordinateSystem()
public PointI forwardTransform(PointI point) throws GeomException
public PointI inverseTransform(PointI point) throws GeomException
public RangeI forwardTransform(RangeI range) throws GeomException
public RangeI inverseTransform(RangeI range) throws GeomException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |