|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcore.math.Vec2Transform
Stores and operates on a 2-dimensional affine transformation. The transformation is given by = < m, o > s.t. v' = m*v + o.
Field Summary | |
protected Mat2 |
matrix
matrix = m, the linear transformation |
protected Vec2 |
origin
origin = o, the translation |
Constructor Summary | |
Vec2Transform(Vec2 origin,
double scale)
Constructs a new Vec2Transform = < scale*I, origin > |
|
Vec2Transform(Vec2 origin,
Mat2 matrix)
Constructs a new Vec2Transform = < matrix, origin > |
|
Vec2Transform(Vec2Transform transform)
Constructs a new Vec2Transform = 'transform' |
|
Vec2Transform(Vec2 origin,
Vec2 xaxis,
Vec2 yaxis)
Constructs a new Vec2Transform = < [ xaxis, yaxis ], origin > |
Method Summary | |
Vec2Transform |
concatenate(Vec2Transform transform)
Returns: a new Vec2Transform that is the concatenation of 'this' followed by 'transform' |
double |
getScale()
Returns: the scaling of the transform, assuming it is rigid |
Vec2Transform |
invert()
Returns: a new Vec2Transform that is the inverse of 'this' |
boolean |
isRigid()
Returns: true if 'this' is a rigid transformation, otherwise false |
boolean |
isRigidScaled()
Returns: true if 'this' is a scaled rigid transformation, else false |
Vec2Transform |
reflect(Vec2 d)
Returns: a new Vec2Transform that is 'this' reflected across 'd' |
Vec2Transform |
rotate(double theta)
Returns: a new Vec2Transform that is 'this' rotated counter-clockwise by 'theta' |
Vec2Transform |
scale(double scale)
Returns: a new Vec2Transform that is 'this' scaled by 'scale' |
Vec2Transform |
translate(Vec2 origin)
Returns: a new Vec2Transform that is 'this' translated by 'origin' |
Vec2 |
v(Vec2 p)
Returns: a new Vec2 that is 'p' transformed by 'this' |
Vec2 |
V(Vec2 p)
Transforms 'p' y 'this' Returns: resulting 'p' |
Vec2 |
V(Vec2 p,
Vec2 v)
Sets v to the transformation of 'p' by 'this' Returns: resulting 'v' |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Mat2 matrix
protected Vec2 origin
Constructor Detail |
public Vec2Transform(Vec2 origin, double scale)
public Vec2Transform(Vec2 origin, Mat2 matrix)
public Vec2Transform(Vec2 origin, Vec2 xaxis, Vec2 yaxis)
public Vec2Transform(Vec2Transform transform)
Method Detail |
public Vec2Transform invert()
public Vec2Transform concatenate(Vec2Transform transform)
public Vec2Transform translate(Vec2 origin)
public Vec2Transform scale(double scale)
public Vec2Transform rotate(double theta)
public Vec2Transform reflect(Vec2 d)
public boolean isRigid()
public boolean isRigidScaled()
public double getScale()
public Vec2 v(Vec2 p)
public Vec2 V(Vec2 p)
public Vec2 V(Vec2 p, Vec2 v)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |