|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavamorph.CMorphOperator
public class CMorphOperator
Field Summary | |
---|---|
private static boolean |
f_break
If true the user forces the morph process to abort. |
private static int |
left_pixel
RGB value of the current left pixel. |
private static Point |
left_point
Current point coordinates of the left image. |
private static double |
left_ratio
Polygon clip ratio of the current left pixel. |
private static CTransform |
left_trafo
Transformation matrix from result to left point. |
private static CMain |
parent
Application's main class. |
private static CProgress |
progress
Instance of the progress bar. |
private static double |
ratio
If 0.0 1.0
then output is the right image. |
private static int |
result_pixel
RGB value of the current result pixel. |
private static Point |
result_point
Current point coordinates of the result image. |
private static int |
right_pixel
RGB value of the current right pixel. |
private static Point |
right_point
Current point coordinates of the right image. |
private static double |
right_ratio
Polygon clip ratio of the current right pixel. |
private static CTransform |
right_trafo
Transformation matrix from result to right point. |
private static int |
t_idx
Index of the current triangle within all three lists. |
private static Point[] |
withins
List of result points situated within the current result triangle. |
Constructor Summary | |
---|---|
CMorphOperator()
|
Method Summary | |
---|---|
static void |
doBreak()
Enable abort of the morph process forced by user. |
private static void |
genResultTriangles()
Make a weighted average mesh depending on the current ratio. |
private static void |
merge()
Merge (left.pixel, right.pixel)->(result.pixel). |
private static Point |
merge(Point p1,
Point p2)
Merge two points weighted by ratio. |
static void |
morph(CMain parent,
CProgress progress)
Initialize static class components. |
void |
run()
Thread API. |
private static void |
triangle()
Merge all points of a triangle. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static CMain parent
private static double ratio
0.0
1.0
then output is the right image. Every value between them leads to a
merged image.
private static Point left_point
private static Point right_point
private static Point result_point
private static int left_pixel
private static int right_pixel
private static int result_pixel
private static CTransform left_trafo
private static CTransform right_trafo
private static int t_idx
private static Point[] withins
private static double left_ratio
private static double right_ratio
private static boolean f_break
true
the user forces the morph process to abort.
private static CProgress progress
Constructor Detail |
---|
public CMorphOperator()
Method Detail |
---|
public static void morph(CMain parent, CProgress progress)
parent
- Main JFrame.progress
- Progress bar.public static void doBreak()
public void run()
run
in interface Runnable
private static void genResultTriangles()
private static Point merge(Point p1, Point p2)
p1
- First point.p2
- Second point.
private static void triangle()
private static void merge()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |