rp1.rossum
Class RsTransform
java.lang.Object
rp1.rossum.RsTransform
- All Implemented Interfaces:
- java.io.Serializable
public class RsTransform
- extends java.lang.Object
- implements java.io.Serializable
A class for representing matrix-based transformation of object
position and orientation, used for both modeling and graphics.
The transformation array is implemented using a homegeneous matrix
with the expectation that coordinates will be implemented in a compatible
form. Transform matrices are always prefixed to coordinates matrices:
A simple rotation and offset would be expressed as shown:
where theta is rotation angle
T(theta, offsets)*X=X'
| cos(theta) -sin(theta) xOffset | |x| |x'|
| sin(theta) cos(theta) yOffset | |y| = |y'|
| 0 0 1 | |1| |1 |
- See Also:
- Serialized Form
Method Summary |
void |
concat(RsTransform a,
RsTransform b)
|
void |
copy(RsTransform source)
|
RsPoint |
getOffset()
|
double |
getScale()
|
double |
getTheta()
|
void |
iMapArray(int nPoint,
RsPoint[] point,
int[] ix,
int[] iy)
|
void |
iMapArrayIndex(double x,
double y,
int index,
int[] ix,
int[] iy)
|
RsPoint |
map(double x,
double y)
|
void |
map(double x,
double y,
RsPoint output)
|
RsPoint |
map(RsPoint p)
|
void |
map2(RsPoint input,
RsPoint output)
|
void |
map2(RsSegment input,
RsSegment output)
|
RsVector |
mapVector(double vx,
double vy)
|
void |
setOffset(double xOffset,
double yOffset)
|
void |
setTheta(double theta)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m11
public double m11
m12
public double m12
m13
public double m13
m21
public double m21
m22
public double m22
m23
public double m23
RsTransform
public RsTransform()
RsTransform
public RsTransform(RsTransform t)
RsTransform
public RsTransform(double theta,
double xOffset,
double yOffset)
RsTransform
public RsTransform(RsTransform a,
RsTransform b)
concat
public void concat(RsTransform a,
RsTransform b)
getTheta
public double getTheta()
setTheta
public void setTheta(double theta)
getOffset
public RsPoint getOffset()
setOffset
public void setOffset(double xOffset,
double yOffset)
mapVector
public RsVector mapVector(double vx,
double vy)
map
public RsPoint map(RsPoint p)
map
public RsPoint map(double x,
double y)
map
public void map(double x,
double y,
RsPoint output)
iMapArray
public void iMapArray(int nPoint,
RsPoint[] point,
int[] ix,
int[] iy)
iMapArrayIndex
public void iMapArrayIndex(double x,
double y,
int index,
int[] ix,
int[] iy)
map2
public void map2(RsSegment input,
RsSegment output)
map2
public void map2(RsPoint input,
RsPoint output)
copy
public void copy(RsTransform source)
getScale
public double getScale()