|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectixagon.surface.mapper.QuadSurface
public class QuadSurface
Field Summary |
---|
Fields inherited from interface ixagon.surface.mapper.SuperSurface |
---|
BEZIER, DEFAULT_SIZE, QUAD |
Method Summary | |
---|---|
static float |
CCW(Point3D p1,
Point3D p2,
Point3D p3)
Three points are a counter-clockwise turn if ccw > 0, clockwise if ccw < 0, and collinear if ccw = 0 because ccw is a determinant that gives the signed area of the triangle formed by p1, p2 and p3. |
void |
clearSurfaceMask()
|
void |
decreaseHorizontalForce()
Decrease the amount of horizontal displacement force used for spherical mapping for bezier surfaces. |
void |
decreaseResolution()
Decrease the subdivision |
void |
decreaseVerticalForce()
Decrease the amount of horizontal displacement force used for spherical mapping for bezier surfaces. |
int |
getActiveBezierPointIndex(int mX,
int mY)
Returns index 0-7 if coordinates are on a bezier control |
int |
getActiveCornerPointIndex(int mX,
int mY)
Checks if the coordinates is close to any of the corners, and if not, checks if the coordinates are inside the surface. |
int |
getActivePoint()
Get the index of the active corner |
double |
getArea()
Calculate the area in squarepixels |
Point3D |
getBezierPoint(int index)
Get target Bezier control point |
float |
getBlendLeftSize()
Get the width of the left edge blend |
float |
getBlendRightSize()
Get the width of the right edge blend |
int |
getBufferScreenWidth()
|
Point3D |
getCenter()
Find the average position of all the control points, use that as the center point. |
int |
getColor()
Get the fill color of the surface in calibration mode |
Point3D |
getCornerPoint(int index)
Get a specific corner |
Point3D[] |
getCornerPoints()
Get all corners |
int |
getHorizontalForce()
Get the amount of horizontal displacement force used for spherical mapping for bezier surfaces. |
int |
getId()
Get the surfaces ID |
boolean |
getLocked()
See if the surface is locked |
double |
getLongestSide()
Get the longest side as double |
File |
getMaskFile()
|
Polygon |
getPolygon()
Get the surface as a polygon |
int |
getRes()
Get the amount of subdivision used in the surface |
int |
getSelectedBezierControl()
Get the currently selected bezier control |
int |
getSelectedCorner()
Get the currently selected corner |
Sketch |
getSketch()
|
processing.core.PImage |
getSurfaceMask()
|
String |
getSurfaceName()
|
int |
getSurfaceType()
See which type this surface is |
processing.core.PVector[] |
getTextureWindow()
|
int |
getVerticalForce()
Get the amount of vertical displacement force used for spherical mapping for bezier surfaces. |
void |
increaseHorizontalForce()
Increase the amount of horizontal displacement force used for spherical mapping for bezier surfaces. |
void |
increaseResolution()
Increase the subdivision |
void |
increaseVerticalForce()
Increase the amount of vertical displacement force used for spherical mapping for bezier surfaces. |
boolean |
isBlendLeft()
See if the surface has been set to blend on the left |
boolean |
isBlendRight()
See if the surface has been set to blend on the right |
boolean |
isCornerMovementAllowed()
See if we can move the cornerpoint of the surface |
boolean |
isHidden()
See if the surface is hidden |
boolean |
isInside(float mX,
float mY)
Check if coordinates are inside the surface |
boolean |
isLocked()
See if the surface is locked |
boolean |
isSelected()
See if the surface is selected |
boolean |
isUsingEdgeBlend()
See if the surface is using edge blend |
boolean |
isUsingSurfaceMask()
|
void |
render(processing.core.PGraphics g)
Render method for rendering while in calibration mode |
void |
render(processing.core.PGraphics g,
processing.core.PImage tex)
Render method for rendering in RENDER mode. |
void |
rotateCornerPoints(int direction)
Rotate the cornerpoints in direction (0=ClockWise 1=CounterClockWise) |
Point3D |
screenCoordinatesToQuad(float x,
float y)
Translate a point on the screen into a point in the surface. |
void |
setActivePoint(int activePoint)
Set index of which corner is active |
void |
setBezierPoint(int pointIndex,
float x,
float y)
Set target bezier control point to coordinates |
void |
setBlendLeft(boolean blendLeft)
Set if the left side should be blended |
void |
setBlendLeftSize(float blendLeftSize)
Set the width of the left edge blend |
void |
setBlendRight(boolean blendRight)
Set if the right side should be blended |
void |
setBlendRightSize(float blendRightSize)
Set the width of the right edge blend |
void |
setBufferScreenWidth(int bufferScreenWidth)
Set the width of the buffer offscreen |
void |
setColor(int ccolor)
Sets the fill color of the surface in calibration mode |
void |
setCornerPoint(int pointIndex,
float inX,
float inY)
Set the coordinates of one of the target corner points. |
void |
setCornerPoints(float x0,
float y0,
float x1,
float y1,
float x2,
float y2,
float x3,
float y3)
Set all four corners of the surface |
void |
setHide(boolean hidden)
Set if the surface should be hidden |
void |
setId(int id)
Set the surfaces ID |
void |
setLocked(boolean isLocked)
Set if the surface is locked |
void |
setMaskFile(File maskFile)
|
void |
setModeCalibrate()
Set surface to calibration mode |
void |
setModeRender()
Set surface to render mode |
void |
setSelected(boolean selected)
Set if the surface is selected |
void |
setSelectedBezierControl(int selectedBezierControl)
Set target bezier control to selected |
void |
setSelectedCorner(int selectedCorner)
Set the currently selected corner |
void |
setShake(int strength,
int speed,
int fallOfSpeed)
Set parameters for shaking the surface. |
void |
setSketch(Sketch sketch)
|
void |
setSurfaceMask(processing.core.PImage mask)
|
void |
setSurfaceName(String surfaceName)
Sets the name of the surface |
void |
setTextureWindow(float x,
float y,
float width,
float height)
Manually set coordinates for mapping the texture. |
void |
setZ(float currentZ)
Set Z-displacement for all coordinates of surface |
void |
shake()
Tells surface to shake (will only do something if setShake has been called quite recently) |
void |
toggleLocked()
Toggle if surface is locked (a locked surface cannot be moved or manipulated in calibration mode, but other surfaces still snap to it) |
void |
toggleMode()
Toggle surface mode |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static float CCW(Point3D p1, Point3D p2, Point3D p3)
public void clearSurfaceMask()
clearSurfaceMask
in interface SuperSurface
public void decreaseHorizontalForce()
SuperSurface
decreaseHorizontalForce
in interface SuperSurface
public void decreaseResolution()
decreaseResolution
in interface SuperSurface
public void decreaseVerticalForce()
SuperSurface
decreaseVerticalForce
in interface SuperSurface
public int getActiveBezierPointIndex(int mX, int mY)
SuperSurface
getActiveBezierPointIndex
in interface SuperSurface
public int getActiveCornerPointIndex(int mX, int mY)
getActiveCornerPointIndex
in interface SuperSurface
mX
- mY
-
public int getActivePoint()
getActivePoint
in interface SuperSurface
public double getArea()
getArea
in interface SuperSurface
public Point3D getBezierPoint(int index)
SuperSurface
getBezierPoint
in interface SuperSurface
public float getBlendLeftSize()
SuperSurface
getBlendLeftSize
in interface SuperSurface
public float getBlendRightSize()
SuperSurface
getBlendRightSize
in interface SuperSurface
public int getBufferScreenWidth()
public Point3D getCenter()
getCenter
in interface SuperSurface
public int getColor()
getColor
in interface SuperSurface
public Point3D getCornerPoint(int index)
getCornerPoint
in interface SuperSurface
index
-
public Point3D[] getCornerPoints()
getCornerPoints
in interface SuperSurface
public int getHorizontalForce()
SuperSurface
getHorizontalForce
in interface SuperSurface
public int getId()
getId
in interface SuperSurface
public boolean getLocked()
public double getLongestSide()
getLongestSide
in interface SuperSurface
public File getMaskFile()
getMaskFile
in interface SuperSurface
public Polygon getPolygon()
getPolygon
in interface SuperSurface
public int getRes()
getRes
in interface SuperSurface
public int getSelectedBezierControl()
getSelectedBezierControl
in interface SuperSurface
public int getSelectedCorner()
getSelectedCorner
in interface SuperSurface
public Sketch getSketch()
getSketch
in interface SuperSurface
public processing.core.PImage getSurfaceMask()
getSurfaceMask
in interface SuperSurface
public String getSurfaceName()
getSurfaceName
in interface SuperSurface
public int getSurfaceType()
SuperSurface
getSurfaceType
in interface SuperSurface
public processing.core.PVector[] getTextureWindow()
getTextureWindow
in interface SuperSurface
public int getVerticalForce()
SuperSurface
getVerticalForce
in interface SuperSurface
public void increaseHorizontalForce()
SuperSurface
increaseHorizontalForce
in interface SuperSurface
public void increaseResolution()
increaseResolution
in interface SuperSurface
public void increaseVerticalForce()
SuperSurface
increaseVerticalForce
in interface SuperSurface
public boolean isBlendLeft()
SuperSurface
isBlendLeft
in interface SuperSurface
public boolean isBlendRight()
SuperSurface
isBlendRight
in interface SuperSurface
public boolean isCornerMovementAllowed()
SuperSurface
isCornerMovementAllowed
in interface SuperSurface
public boolean isHidden()
isHidden
in interface SuperSurface
public boolean isInside(float mX, float mY)
isInside
in interface SuperSurface
mX
- mY
-
public boolean isLocked()
SuperSurface
isLocked
in interface SuperSurface
public boolean isSelected()
isSelected
in interface SuperSurface
public boolean isUsingEdgeBlend()
SuperSurface
isUsingEdgeBlend
in interface SuperSurface
public boolean isUsingSurfaceMask()
isUsingSurfaceMask
in interface SuperSurface
public void render(processing.core.PGraphics g)
render
in interface SuperSurface
g
- public void render(processing.core.PGraphics g, processing.core.PImage tex)
render
in interface SuperSurface
g
- tex
- public void rotateCornerPoints(int direction)
rotateCornerPoints
in interface SuperSurface
direction
- public Point3D screenCoordinatesToQuad(float x, float y)
screenCoordinatesToQuad
in interface SuperSurface
x
- y
-
public void setActivePoint(int activePoint)
setActivePoint
in interface SuperSurface
activePoint
- public void setBezierPoint(int pointIndex, float x, float y)
SuperSurface
setBezierPoint
in interface SuperSurface
public void setBlendLeft(boolean blendLeft)
SuperSurface
setBlendLeft
in interface SuperSurface
public void setBlendLeftSize(float blendLeftSize)
SuperSurface
setBlendLeftSize
in interface SuperSurface
public void setBlendRight(boolean blendRight)
SuperSurface
setBlendRight
in interface SuperSurface
public void setBlendRightSize(float blendRightSize)
SuperSurface
setBlendRightSize
in interface SuperSurface
public void setBufferScreenWidth(int bufferScreenWidth)
SuperSurface
setBufferScreenWidth
in interface SuperSurface
public void setColor(int ccolor)
setColor
in interface SuperSurface
ccolor
- public void setCornerPoint(int pointIndex, float inX, float inY)
setCornerPoint
in interface SuperSurface
pointIndex
- public void setCornerPoints(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3)
setCornerPoints
in interface SuperSurface
x0
- y0
- x1
- y1
- x2
- y2
- x3
- y3
- public void setHide(boolean hidden)
setHide
in interface SuperSurface
hidden
- public void setId(int id)
setId
in interface SuperSurface
id
- public void setLocked(boolean isLocked)
setLocked
in interface SuperSurface
isLocked
- public void setMaskFile(File maskFile)
setMaskFile
in interface SuperSurface
public void setModeCalibrate()
SuperSurface
setModeCalibrate
in interface SuperSurface
public void setModeRender()
SuperSurface
setModeRender
in interface SuperSurface
public void setSelected(boolean selected)
setSelected
in interface SuperSurface
selected
- public void setSelectedBezierControl(int selectedBezierControl)
SuperSurface
setSelectedBezierControl
in interface SuperSurface
public void setSelectedCorner(int selectedCorner)
setSelectedCorner
in interface SuperSurface
selectedCorner
- public void setShake(int strength, int speed, int fallOfSpeed)
setShake
in interface SuperSurface
strength
- speed
- fallOfSpeed
- public void setSketch(Sketch sketch)
setSketch
in interface SuperSurface
public void setSurfaceMask(processing.core.PImage mask)
setSurfaceMask
in interface SuperSurface
public void setSurfaceName(String surfaceName)
SuperSurface
setSurfaceName
in interface SuperSurface
public void setTextureWindow(float x, float y, float width, float height)
setTextureWindow
in interface SuperSurface
public void setZ(float currentZ)
setZ
in interface SuperSurface
currentZ
- public void shake()
shake
in interface SuperSurface
public void toggleLocked()
toggleLocked
in interface SuperSurface
public void toggleMode()
SuperSurface
toggleMode
in interface SuperSurface
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |