Interface SuperSurface

    • 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)
      • getSketchIndex

        int getSketchIndex()
        Get the actual sketch index.
      • setSketchIndex

        void setSketchIndex​(int sketchIndex)
        Set the actual sketch index.
      • toggleLocked

        void toggleLocked()
        Toggle if surface is locked
      • toggleMode

        void toggleMode()
        Toggle surface mode