deadpixel.revkeystone
Class ReverseCornerPinSurface

java.lang.Object
  extended by deadpixel.revkeystone.ReverseCornerPinSurface

public class ReverseCornerPinSurface
extends java.lang.Object

A simple Corner Pin keystoned surface. The surface is a quad mesh that can be skewed to an abitrary shape by moving its four corners.


Method Summary
 int getRes()
           
 processing.core.PVector getTransformedMouse()
          This function will give you the position of the mouse in the surface's coordinate system.
 boolean isMouseOver()
          Returns true if the mouse is over this surface, false otherwise.
 void makeRectangular()
           
 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
 void updateUV()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRes

public int getRes()
Returns:
The surface's mesh resolution, in number of "tiles"

render

public void render(processing.core.PImage texture)
Renders and applies keystoning to the image using the parent applet's renderer.


render

public void render(processing.core.PGraphics g,
                   processing.core.PImage texture)
Renders and applies keystoning to the image using a specific renderer.


getTransformedMouse

public processing.core.PVector getTransformedMouse()
This function will give you the position of the mouse in the surface's coordinate system.

Returns:
The transformed mouse position

setGridColor

public void setGridColor(int newColor)
Sets the grid used for calibration's color


setControlPointsColor

public void setControlPointsColor(int newColor)
Sets the control points color


isMouseOver

public boolean isMouseOver()
Returns true if the mouse is over this surface, false otherwise.


moveTo

public void moveTo(float x,
                   float y)

updateUV

public void updateUV()

makeRectangular

public void makeRectangular()


processing library revkeystone by yourNameHere. (c) 2008