|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrvg.keystone20.CornerPinSurface
public class CornerPinSurface
A simple Corner Pin keystoned surface. The surface is a quad mesh that can be skewed to an arbitrary shape by moving its four corners. September-2011 Added JAI library for keystone calculus (@edumo)
Method Summary | |
---|---|
protected void |
calculateMesh()
Interpolates the position of the points in the mesh according to the 4 corners TODO: allow for abritrary control points, not just the four corners |
int |
getRes()
|
processing.core.PVector |
getTransformedCursor(int cx,
int cy)
This function will give you the position of the mouse in the surface's coordinate system. |
processing.core.PVector |
getTransformedMouse()
|
boolean |
isMouseOver()
Returns true if the mouse is over this surface, false otherwise. |
void |
moveTo(float x,
float y)
|
void |
render(processing.core.PGraphics g,
processing.core.PImage texture)
Renders and applies keystoning to the image using a specific renderer. |
void |
render(processing.core.PImage texture)
Renders and applies keystoning to the image using the parent applet's renderer. |
void |
setControlPointsColor(int newColor)
Sets the control points color |
void |
setGridColor(int newColor)
Sets the grid used for calibration's color |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public int getRes()
public void render(processing.core.PImage texture)
public void render(processing.core.PGraphics g, processing.core.PImage texture)
public processing.core.PVector getTransformedCursor(int cx, int cy)
public processing.core.PVector getTransformedMouse()
public void setGridColor(int newColor)
public void setControlPointsColor(int newColor)
public boolean isMouseOver()
protected void calculateMesh()
public void moveTo(float x, float y)
x
- x-coordinatey
- y-coordinate
This moves the surface according to the offset from where the
mouse was pressed when selecting the surface.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |