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 shapeRetrieves the points representing the bounding shape (e.g., rectangle) around the ellipse.javax.vecmath.Vector3d
Gets camera positiongetColor()
Gets the origin point.Gets points to be projected.Gets the resize pointgets the selceted pointGets the shift pointboolean
selectPoint
(Point location) Selects a point for further manipulationvoid
setCameraPosition
(javax.vecmath.Vector3d cameraPosition) Sets camera position vectorvoid
Sets color of maskvoid
Sets the origin point.void
Sets the resize pointvoid
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
-
-
getColor
Color getColor()- Returns:
- color of mask
-
setColor
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
Sets the origin point. -
getResize
Point getResize()Gets the resize point- Returns:
- resize point
-
setResize
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.
-