Package org.anchoranalysis.mpp.mark
Class MarkWithPosition
Object
org.anchoranalysis.mpp.mark.Mark
org.anchoranalysis.mpp.mark.MarkWithPosition
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ConicBase,MarkWithPositionAndSingleRadius,RotatableBoundingBox
public abstract class MarkWithPosition extends Mark implements Serializable
An abstract base class for marks that have a position in 3D space.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Modifier Constructor Description protectedMarkWithPosition()Constructs a new MarkWithPosition with a default position at the origin.protectedMarkWithPosition(MarkWithPosition src)Copy constructor for MarkWithPosition. -
Method Summary
Modifier and Type Method Description org.anchoranalysis.spatial.point.Point3dcenterPoint()Returns the center point of the mark.booleanequalsDeep(Mark m)Checks if this mark is equal to another mark by comparing all attributes.org.anchoranalysis.spatial.point.Point3dgetPosition()The position of the mark in 3D space.protected StringpositionString()Describes the position of the mark as a string.voidscale(org.anchoranalysis.spatial.scale.ScaleFactor scaleFactor)Scales the mark in X and Y dimensions.voidsetPosition(org.anchoranalysis.spatial.point.Point3d position)The position of the mark in 3D space.Methods inherited from class org.anchoranalysis.mpp.mark.Mark
box, boxAllRegions, deriveObject, duplicate, equalsID, getIdentifier, getName, identifier, isPointInside, numberDimensions, numberRegions, quickOverlap, setId, volume
-
Constructor Details
-
MarkWithPosition
protected MarkWithPosition()Constructs a new MarkWithPosition with a default position at the origin. -
MarkWithPosition
Copy constructor for MarkWithPosition.- Parameters:
src- the MarkWithPosition to copy
-
-
Method Details
-
positionString
Describes the position of the mark as a string.- Returns:
- the string.
-
scale
public void scale(org.anchoranalysis.spatial.scale.ScaleFactor scaleFactor) throws CheckedUnsupportedOperationExceptionDescription copied from class:MarkScales the mark in X and Y dimensions.- Specified by:
scalein classMark- Parameters:
scaleFactor- how much to scale by- Throws:
CheckedUnsupportedOperationException- if scaling is not supported for this mark type
-
centerPoint
public org.anchoranalysis.spatial.point.Point3d centerPoint()Description copied from class:MarkReturns the center point of the mark.- Specified by:
centerPointin classMark- Returns:
- the center point as a Point3d
-
equalsDeep
Checks if this mark is equal to another mark by comparing all attributes.- Overrides:
equalsDeepin classMark- Parameters:
m- the mark to compare with- Returns:
- true if the marks are equal, false otherwise
-
getPosition
public org.anchoranalysis.spatial.point.Point3d getPosition()The position of the mark in 3D space. -
setPosition
public void setPosition(org.anchoranalysis.spatial.point.Point3d position)The position of the mark in 3D space.
-