public class Transform2D extends DoubleSquareMatrix
swigCMemOwn
Modifier | Constructor and Description |
---|---|
|
Transform2D()
Constructor.
|
protected |
Transform2D(long cPtr,
boolean cMemoryOwn) |
Modifier and Type | Method and Description |
---|---|
void |
delete() |
protected void |
finalize() |
protected static long |
getCPtr(Transform2D obj) |
void |
setToIdentity() |
void |
SetTransform(Point2D pt,
double angle)
Set the trans form to counterclock wise rotation by the specified value around point.
|
void |
SetTransform(Point2D ref1,
Point2D ref2,
Point2D pt1,
Point2D pt2)
Set the tranform so that the specified points are aligned.
|
void |
SetTranslation(Point2D pt) |
void |
TransformPoint(Point2D pt) |
getCPtr, transposeInplace
protected Transform2D(long cPtr, boolean cMemoryOwn)
public Transform2D()
Constructor.
Initialize to an identity matrix transformation This is a 3x3 matrix that includes the rotation and translation parts see Foley's 'Introduction to Computer Graphics' for the representation
Operator *= and = are provided by the parent class square matrix. Operator *= needs some explanation, since the order matters. This transform gets set to the combination other and the current state of this transform If this_old and this_new are the states of this object before and after this function we have this_new(point) = this_old(other(point))
protected static long getCPtr(Transform2D obj)
protected void finalize()
finalize
in class DoubleSquareMatrix
public void delete()
delete
in class DoubleSquareMatrix
public void setToIdentity()
public void TransformPoint(Point2D pt)
public void SetTranslation(Point2D pt)
public void SetTransform(Point2D ref1, Point2D ref2, Point2D pt1, Point2D pt2)
Set the tranform so that the specified points are aligned.
The resulting tranformation will align pt1 with ref1, and rotation pt2 such that the line betweem (pt1, pt2) will align with with the line (ref1, ref2)
public void SetTransform(Point2D pt, double angle)
Set the trans form to counterclock wise rotation by the specified value around point.
ARGUMENTS:
pt : point about which to rotate angle : the angle byt which to rotate