public interface SuperSurface
Modifier and Type | Field and Description |
---|---|
static int |
BEZIER |
static int |
DEFAULT_SIZE |
static int |
QUAD |
Modifier and Type | Method and Description |
---|---|
void |
clearSurfaceMask() |
void |
decreaseHorizontalForce()
Decrease the amount of horizontal displacement force used for spherical mapping for bezier surfaces.
|
void |
decreaseResolution()
Decrease the amount of 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)
Returns index 0-3 if coordinates are near a corner or index -2 if on a surface
|
int |
getActivePoint()
Get the index of active corner (or surface)
|
double |
getArea()
Calculates and returns the surfaces 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
|
Point3D |
getCenter()
Get the average center point of the surface
|
int |
getColor()
Get the surfaces current fill color in calibration mode
|
Point3D |
getCornerPoint(int index)
Get the target corner point
|
Point3D[] |
getCornerPoints()
Get all corner points
|
int |
getHorizontalForce()
Get the amount of horizontal displacement force used for spherical mapping for bezier surfaces.
|
int |
getId()
Get the surfaces ID
|
double |
getLongestSide() |
File |
getMaskFile() |
Polygon |
getPolygon()
Get the surfaces polygon
|
int |
getRes()
The the amount of subdivision currently used
|
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 amount of 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 surface is hidden
|
boolean |
isInside(float mX,
float mY)
Returns true if coordinates are inside a 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)
Renders the surface in calibration mode
|
void |
render(processing.core.PGraphics g,
processing.core.PImage tex)
Render the surface with texture
|
void |
rotateCornerPoints(int direction)
Rotate the corners of surface (0=ClockWise, 1=CounterClockWise)
TODO Broken for Bezier Surfaces
|
Point3D |
screenCoordinatesToQuad(float x,
float y)
Translates 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 width)
Set the width of the buffer offscreen
|
void |
setColor(int ccolor)
Set the fill color of the surface in calibration mode
|
void |
setCornerPoint(int pointIndex,
float x,
float y)
Set target corner point to coordinates
|
void |
setCornerPoints(float x0,
float y0,
float x1,
float y1,
float x2,
float y2,
float x3,
float y3)
Manually set coordinates for all corners of the surface
|
void |
setHide(boolean hide)
Set if surface is hidden
|
void |
setId(int id)
Set the ID of the surface
|
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 target corner to selected
|
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 name)
Sets the name of the surface
|
void |
setTextureWindow(float x,
float y,
float width,
float height) |
void |
setZ(float z)
Set the Z displacement for all coordinates of the 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
|
void |
toggleMode()
Toggle surface mode
|
static final int QUAD
static final int BEZIER
static final int DEFAULT_SIZE
void clearSurfaceMask()
void decreaseHorizontalForce()
void decreaseResolution()
void decreaseVerticalForce()
int getActiveBezierPointIndex(int mX, int mY)
mX
- mY
- int getActiveCornerPointIndex(int mX, int mY)
mX
- mY
- int getActivePoint()
double getArea()
Point3D getBezierPoint(int index)
index
- float getBlendLeftSize()
float getBlendRightSize()
Point3D getCenter()
int getColor()
Point3D getCornerPoint(int index)
index
- Point3D[] getCornerPoints()
int getHorizontalForce()
int getId()
double getLongestSide()
File getMaskFile()
Polygon getPolygon()
int getRes()
int getSelectedBezierControl()
int getSelectedCorner()
Sketch getSketch()
processing.core.PImage getSurfaceMask()
String getSurfaceName()
int getSurfaceType()
processing.core.PVector[] getTextureWindow()
int getVerticalForce()
void increaseHorizontalForce()
void increaseResolution()
void increaseVerticalForce()
boolean isBlendLeft()
boolean isBlendRight()
boolean isCornerMovementAllowed()
boolean isHidden()
boolean isInside(float mX, float mY)
mX
- mY
- boolean isLocked()
boolean isSelected()
boolean isUsingEdgeBlend()
boolean isUsingSurfaceMask()
void render(processing.core.PGraphics g)
g
- void render(processing.core.PGraphics g, processing.core.PImage tex)
g
- tex
- void rotateCornerPoints(int direction)
direction
- Point3D screenCoordinatesToQuad(float x, float y)
x
- y
- void setActivePoint(int activePoint)
activePoint
- void setBezierPoint(int pointIndex, float x, float y)
pointIndex
- x
- y
- void setBlendLeft(boolean blendLeft)
blendLeft
- void setBlendLeftSize(float blendLeftSize)
void setBlendRight(boolean blendRight)
blendRight
- void setBlendRightSize(float blendRightSize)
void setBufferScreenWidth(int width)
void setColor(int ccolor)
ccolor
- void setCornerPoint(int pointIndex, float x, float y)
pointIndex
- x
- y
- void setCornerPoints(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3)
x0
- y0
- x1
- y1
- x2
- y2
- x3
- y3
- void setHide(boolean hide)
hide
- void setId(int id)
id
- void setLocked(boolean isLocked)
isLocked
- void setMaskFile(File maskFile)
void setModeCalibrate()
void setModeRender()
void setSelected(boolean selected)
selected
- void setSelectedBezierControl(int selectedBezierControl)
selectedBezierControl
- void setSelectedCorner(int selectedCorner)
selectedCorner
- void setShake(int strength, int speed, int fallOfSpeed)
strength
- speed
- fallOfSpeed
- void setSketch(Sketch sketch)
void setSurfaceMask(processing.core.PImage mask)
void setSurfaceName(String name)
name
- void setTextureWindow(float x, float y, float width, float height)
void setZ(float z)
z
- void shake()
void toggleLocked()
void toggleMode()
Copyright © 2017. All rights reserved.