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
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
A class representing point to be projected -
Method Summary
Modifier and TypeMethodDescriptionboolean
addNewPoint
(Point point) Define a new point for the maskboolean
containsPoint
(Point middle) check if location is within the mask shapeGets points to be projected.gets the selceted pointGets the shift pointboolean
selectPoint
(Point location) Selects a point for further manipulationvoid
setSamplingStrength
(int samplingStrength) Sets the sampling strengthvoid
setSelectedPoint
(Point point) Sets/resets the selected pointvoid
setShiftPoint
(Point point) Sets shift pointvoid
shiftMask
(int dx, int dy) Shifts the mask by a delta in the x and y direction.void
updateSelectedPoint
(Point point) Updates selected point by changing it's location
-
Method Details
-
getPointsToProject
List<SurfaceMask2D.PointToProject> getPointsToProject()Gets points to be projected.- Returns:
- a list of Point
-
selectPoint
Selects a point for further manipulation- Parameters:
location
- of the point to select- Returns:
- true if selected
-
setSelectedPoint
Sets/resets the selected point- Parameters:
point
- to set
-
addNewPoint
Define a new point for the mask- Parameters:
point
- new point to add- Returns:
- true if addition succeded
-
containsPoint
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 directiondy
- delta in the y direction
-
setShiftPoint
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
Updates selected point by changing it's location- Parameters:
point
- location to set
-
setSamplingStrength
void setSamplingStrength(int samplingStrength) Sets the sampling strength- Parameters:
samplingStrength
-
-