ixagon.surface.mapper
Interface SuperSurface

All Known Implementing Classes:
BezierSurface, QuadSurface

public interface SuperSurface


Field Summary
static int BEZIER
           
static int DEFAULT_SIZE
           
static int QUAD
           
 
Method Summary
 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
 

Field Detail

QUAD

static final int QUAD
See Also:
Constant Field Values

BEZIER

static final int BEZIER
See Also:
Constant Field Values

DEFAULT_SIZE

static final int DEFAULT_SIZE
See Also:
Constant Field Values
Method Detail

clearSurfaceMask

void clearSurfaceMask()

decreaseHorizontalForce

void decreaseHorizontalForce()
Decrease the amount of horizontal displacement force used for spherical mapping for bezier surfaces. (using orthographic projection)


decreaseResolution

void decreaseResolution()
Decrease the amount of subdivision


decreaseVerticalForce

void decreaseVerticalForce()
Decrease the amount of horizontal displacement force used for spherical mapping for bezier surfaces. (using orthographic projection)


getActiveBezierPointIndex

int getActiveBezierPointIndex(int mX,
                              int mY)
Returns index 0-7 if coordinates are on a bezier control

Parameters:
mX -
mY -
Returns:

getActiveCornerPointIndex

int getActiveCornerPointIndex(int mX,
                              int mY)
Returns index 0-3 if coordinates are near a corner or index -2 if on a surface

Parameters:
mX -
mY -
Returns:

getActivePoint

int getActivePoint()
Get the index of active corner (or surface)

Returns:

getArea

double getArea()
Calculates and returns the surfaces area in squarepixels.

Returns:

getBezierPoint

Point3D getBezierPoint(int index)
Get target Bezier control point

Parameters:
index -
Returns:

getBlendLeftSize

float getBlendLeftSize()
Get the width of the left edge blend

Returns:

getBlendRightSize

float getBlendRightSize()
Get the width of the right edge blend

Returns:

getCenter

Point3D getCenter()
Get the average center point of the surface

Returns:

getColor

int getColor()
Get the surfaces current fill color in calibration mode

Returns:

getCornerPoint

Point3D getCornerPoint(int index)
Get the target corner point

Parameters:
index -
Returns:

getCornerPoints

Point3D[] getCornerPoints()
Get all corner points

Returns:

getHorizontalForce

int getHorizontalForce()
Get the amount of horizontal displacement force used for spherical mapping for bezier surfaces.


getId

int getId()
Get the surfaces ID

Returns:

getLongestSide

double getLongestSide()

getMaskFile

File getMaskFile()

getPolygon

Polygon getPolygon()
Get the surfaces polygon

Returns:

getRes

int getRes()
The the amount of subdivision currently used

Returns:

getSelectedBezierControl

int getSelectedBezierControl()
Get the currently selected bezier control

Returns:

getSelectedCorner

int getSelectedCorner()
Get the currently selected corner

Returns:

getSketch

Sketch getSketch()

getSurfaceMask

processing.core.PImage getSurfaceMask()

getSurfaceName

String getSurfaceName()

getSurfaceType

int getSurfaceType()
See which type this surface is

Returns:

getTextureWindow

processing.core.PVector[] getTextureWindow()

getVerticalForce

int getVerticalForce()
Get the amount of vertical displacement force used for spherical mapping for bezier surfaces.


increaseHorizontalForce

void increaseHorizontalForce()
Increase the amount of horizontal displacement force used for spherical mapping for bezier surfaces. (using orthographic projection)


increaseResolution

void increaseResolution()
Increase the amount of subdivision


increaseVerticalForce

void increaseVerticalForce()
Increase the amount of vertical displacement force used for spherical mapping for bezier surfaces. (using orthographic projection)


isBlendLeft

boolean isBlendLeft()
See if the surface has been set to blend on the left

Returns:

isBlendRight

boolean isBlendRight()
See if the surface has been set to blend on the right

Returns:

isCornerMovementAllowed

boolean isCornerMovementAllowed()
See if we can move the cornerpoint of the surface

Returns:

isHidden

boolean isHidden()
See if surface is hidden

Returns:

isInside

boolean isInside(float mX,
                 float mY)
Returns true if coordinates are inside a surface

Parameters:
mX -
mY -
Returns:

isLocked

boolean isLocked()
See if the surface is locked

Returns:

isSelected

boolean isSelected()
See if the surface is selected

Returns:

isUsingEdgeBlend

boolean isUsingEdgeBlend()
See if the surface is using edge blend

Returns:

isUsingSurfaceMask

boolean isUsingSurfaceMask()

render

void render(processing.core.PGraphics g)
Renders the surface in calibration mode

Parameters:
g -

render

void render(processing.core.PGraphics g,
            processing.core.PImage tex)
Render the surface with texture

Parameters:
g -
tex -

rotateCornerPoints

void rotateCornerPoints(int direction)
Rotate the corners of surface (0=ClockWise, 1=CounterClockWise) TODO Broken for Bezier Surfaces

Parameters:
direction -

screenCoordinatesToQuad

Point3D screenCoordinatesToQuad(float x,
                                float y)
Translates a point on the screen into a point in the surface. (not implemented in Bezier Surfaces)

Parameters:
x -
y -
Returns:

setActivePoint

void setActivePoint(int activePoint)
Set index of which corner is active

Parameters:
activePoint -

setBezierPoint

void setBezierPoint(int pointIndex,
                    float x,
                    float y)
Set target bezier control point to coordinates

Parameters:
pointIndex -
x -
y -

setBlendLeft

void setBlendLeft(boolean blendLeft)
Set if the left side should be blended

Parameters:
blendLeft -

setBlendLeftSize

void setBlendLeftSize(float blendLeftSize)
Set the width of the left edge blend


setBlendRight

void setBlendRight(boolean blendRight)
Set if the right side should be blended

Parameters:
blendRight -

setBlendRightSize

void setBlendRightSize(float blendRightSize)
Set the width of the right edge blend


setBufferScreenWidth

void setBufferScreenWidth(int width)
Set the width of the buffer offscreen


setColor

void setColor(int ccolor)
Set the fill color of the surface in calibration mode

Parameters:
ccolor -

setCornerPoint

void setCornerPoint(int pointIndex,
                    float x,
                    float y)
Set target corner point to coordinates

Parameters:
pointIndex -
x -
y -

setCornerPoints

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

Parameters:
x0 -
y0 -
x1 -
y1 -
x2 -
y2 -
x3 -
y3 -

setHide

void setHide(boolean hide)
Set if surface is hidden

Parameters:
hide -

setId

void setId(int id)
Set the ID of the surface

Parameters:
id -

setLocked

void setLocked(boolean isLocked)
Set if the surface is locked

Parameters:
isLocked -

setMaskFile

void setMaskFile(File maskFile)

setModeCalibrate

void setModeCalibrate()
Set surface to calibration mode


setModeRender

void setModeRender()
Set surface to render mode


setSelected

void setSelected(boolean selected)
Set if the surface is selected

Parameters:
selected -

setSelectedBezierControl

void setSelectedBezierControl(int selectedBezierControl)
Set target bezier control to selected

Parameters:
selectedBezierControl -

setSelectedCorner

void setSelectedCorner(int selectedCorner)
Set target corner to selected

Parameters:
selectedCorner -

setShake

void setShake(int strength,
              int speed,
              int fallOfSpeed)
Set parameters for shaking the surface. Strength == max Z-displacement, Speed == vibration speed, FallOfSpeed 1-1000 == how fast strength is diminished

Parameters:
strength -
speed -
fallOfSpeed -

setSketch

void setSketch(Sketch sketch)

setSurfaceMask

void setSurfaceMask(processing.core.PImage mask)

setSurfaceName

void setSurfaceName(String name)
Sets the name of the surface

Parameters:
name -

setTextureWindow

void setTextureWindow(float x,
                      float y,
                      float width,
                      float height)

setZ

void setZ(float z)
Set the Z displacement for all coordinates of the surface

Parameters:
z -

shake

void shake()
Tells surface to shake (will only do something if setShake has been called quite recently)


toggleLocked

void toggleLocked()
Toggle if surface is locked


toggleMode

void toggleMode()
Toggle surface mode



Copyright © 2015. All rights reserved.