public class TextureDistorter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected processing.core.PVector[][] |
distortedGrid |
Distorter |
distorter |
float |
lightX |
float |
lightY |
protected int |
meshHeight |
protected int |
meshStep |
protected int |
meshWidth |
boolean |
mouse3DRotate |
protected java.util.ArrayList<processing.core.PVector> |
normals |
protected processing.core.PVector[][] |
origGrid |
boolean |
osc3DRotate |
float |
rotX |
float |
rotY |
float |
rotZ |
boolean |
showLight |
protected java.util.ArrayList<processing.core.PVector> |
texCoords |
protected int |
uSteps |
protected java.util.ArrayList<processing.core.PVector> |
vertices |
protected int |
vSteps |
Constructor and Description |
---|
TextureDistorter(processing.core.PApplet papplet,
float width,
float height,
int meshStep) |
TextureDistorter(processing.core.PApplet p,
int meshWidth,
int meshHeight,
int meshStep) |
Modifier and Type | Method and Description |
---|---|
protected void |
addVertex(float x,
float y,
float z,
float u,
float v)
Adds vertex, texture coordinates, and normals.
|
protected void |
createMesh(processing.core.PVector[][] grid) |
protected void |
distortGrid() |
protected void |
distortGridByTexture(processing.core.PImage texture) |
protected void |
distortMesh() |
protected void |
distortVertex(float x,
float y,
float z,
float u,
float v) |
void |
draw(processing.core.PGraphics g,
processing.core.PImage texture) |
protected void |
initGrids() |
void |
setDistorter(Distorter distorter) |
public boolean mouse3DRotate
public boolean osc3DRotate
public float lightX
public float lightY
protected int meshWidth
protected int meshHeight
protected int meshStep
public Distorter distorter
protected int uSteps
protected int vSteps
protected processing.core.PVector[][] origGrid
protected processing.core.PVector[][] distortedGrid
protected java.util.ArrayList<processing.core.PVector> vertices
protected java.util.ArrayList<processing.core.PVector> texCoords
protected java.util.ArrayList<processing.core.PVector> normals
public float rotX
public float rotY
public float rotZ
public boolean showLight
public TextureDistorter(processing.core.PApplet p, int meshWidth, int meshHeight, int meshStep)
public TextureDistorter(processing.core.PApplet papplet, float width, float height, int meshStep)
public void setDistorter(Distorter distorter)
public void draw(processing.core.PGraphics g, processing.core.PImage texture)
protected void initGrids()
protected void distortGridByTexture(processing.core.PImage texture)
protected void distortGrid()
protected void createMesh(processing.core.PVector[][] grid)
protected void distortMesh()
protected void distortVertex(float x, float y, float z, float u, float v)
protected void addVertex(float x, float y, float z, float u, float v)