Interface SurfaceMask2D

All Known Subinterfaces:
SurfaceMaskEllipse, SurfaceMaskLine, SurfaceMaskRectangle
All Known Implementing Classes:
SurfaceMask2DImpl, SurfaceMaskEllipseImpl, SurfaceMaskLineImpl, SurfaceMaskRectangleImpl

public interface SurfaceMask2D
An interface specifying the needed operations for 2D representations of Surface mask
  • Method Details

    • getPointsToProject

      List<SurfaceMask2D.PointToProject> getPointsToProject()
      Gets points to be projected.
      Returns:
      a list of Point
    • selectPoint

      boolean selectPoint(Point location)
      Selects a point for further manipulation
      Parameters:
      location - of the point to select
      Returns:
      true if selected
    • setSelectedPoint

      void setSelectedPoint(Point point)
      Sets/resets the selected point
      Parameters:
      point - to set
    • addNewPoint

      boolean addNewPoint(Point point)
      Define a new point for the mask
      Parameters:
      point - new point to add
      Returns:
      true if addition succeded
    • containsPoint

      boolean containsPoint(Point middle)
      check if location is within the mask shape
      Parameters:
      middle - location to check
      Returns:
      true is inside
    • shiftMask

      void shiftMask(int dx, int dy)
      Shifts the mask by a delta in the x and y direction. Delta is calculated from the previous and the current shift point
      Parameters:
      dx - delta in the x direction
      dy - delta in the y direction
    • setShiftPoint

      void setShiftPoint(Point point)
      Sets shift point
      Parameters:
      point - point to set
    • getShiftPoint

      Point getShiftPoint()
      Gets the shift point
      Returns:
      shift point
    • getSelectedPoint

      Point getSelectedPoint()
      gets the selceted point
      Returns:
      selected point
    • updateSelectedPoint

      void updateSelectedPoint(Point point)
      Updates selected point by changing it's location
      Parameters:
      point - location to set
    • setSamplingStrength

      void setSamplingStrength(int samplingStrength)
      Sets the sampling strength
      Parameters:
      samplingStrength -
    • getColor

      Color getColor()
      Returns:
      color of mask
    • setColor

      void setColor(Color color)
      Sets color of mask
      Parameters:
      color - to be set
    • getCameraPosition

      javax.vecmath.Vector3d getCameraPosition()
      Gets camera position
      Returns:
      camera position vector
    • setCameraPosition

      void setCameraPosition(javax.vecmath.Vector3d cameraPosition)
      Sets camera position vector
      Parameters:
      cameraPosition - to be set
    • getOrigin

      Point getOrigin()
      Gets the origin point.
      Returns:
      origin point.
    • setOrigin

      void setOrigin(Point origin)
      Sets the origin point.
    • getResize

      Point getResize()
      Gets the resize point
      Returns:
      resize point
    • setResize

      void setResize(Point resize)
      Sets the resize point
      Parameters:
      resize - point to be set
    • getBoundingPoints

      List<SurfaceMask2D.PointToProject> getBoundingPoints()
      Retrieves the points representing the bounding shape (e.g., rectangle) around the ellipse. These points define the corners or edges of the bounding shape that encapsulates the ellipse. If mask is not ellipse returns null
      Returns:
      a list of SurfaceMask2D.PointToProject representing the bounding points.