Class MarkWithPositionAndSingleRadius
Object
Mark
MarkWithPosition
MarkWithPositionAndSingleRadius
- All Implemented Interfaces:
Serializable
public abstract class MarkWithPositionAndSingleRadius
extends MarkWithPosition
implements Serializable
Base-class for a conic that has a single radius (circle, sphere etc.)
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedMarkWithPositionAndSingleRadius(Bound boundRadius) Constructor with a bound on the radius.protectedCopy constructor. -
Method Summary
Modifier and TypeMethodDescriptionbox(Dimensions dimensions, int regionID) Calculates the bounding box for a specific region of the mark.boxAllRegions(Dimensions dimensions) Calculates the bounding box for all regions of the mark.booleanequalsDeep(Mark mark) Checks if this mark is equal to another mark by comparing all attributes.doublefinal byteisPointInside(Point3i point) Determines if a point is inside the mark.intReturns the number of regions in this mark.Provides an optional quick overlap calculation method.protected doubleradiusForRegion(int regionID) Calculates the radius for a specific region.protected doubleradiusForRegionSquared(int regionID) Calculates the squared radius for a specific region.voidscale(ScaleFactor scaleFactor) Objects are scaled in pre-rotated position.voidsetRadius(double radius) Sets the radius of the mark.strMarks()Returns a string representation of the mark's attributes.Methods inherited from class org.anchoranalysis.mpp.mark.MarkWithPosition
centerPoint, getPosition, positionString, setPositionMethods inherited from class org.anchoranalysis.mpp.mark.Mark
deriveObject, duplicate, equalsID, getIdentifier, getName, identifier, numberDimensions, setId, volume
-
Constructor Details
-
MarkWithPositionAndSingleRadius
Constructor with a bound on the radius.- Parameters:
boundRadius- the bound for the radius
-
MarkWithPositionAndSingleRadius
Copy constructor.- Parameters:
src- the source object to copy from
-
MarkWithPositionAndSingleRadius
protected MarkWithPositionAndSingleRadius()
-
-
Method Details
-
scale
Objects are scaled in pre-rotated position.So when aligned to axes, we actually scale in all 3 dimensions, and ignore scene-resolution
- Overrides:
scalein classMarkWithPosition- Parameters:
scaleFactor- how much to scale by- Throws:
CheckedUnsupportedOperationException- when the scale-factor is not identical for the X and Y dimensions.
-
box
Description copied from class:MarkCalculates the bounding box for a specific region of the mark. -
boxAllRegions
Description copied from class:MarkCalculates the bounding box for all regions of the mark.- Specified by:
boxAllRegionsin classMark- Parameters:
dimensions- the dimensions of the space- Returns:
- the bounding box
-
isPointInside
Description copied from class:MarkDetermines if a point is inside the mark.- Specified by:
isPointInsidein classMark- Parameters:
point- the point to check- Returns:
- a byte representing the region membership of the point
-
quickOverlap
Description copied from class:MarkProvides an optional quick overlap calculation method.- Overrides:
quickOverlapin classMark- Returns:
- an Optional containing a QuickOverlapCalculation, or empty if not available
-
numberRegions
public int numberRegions()Description copied from class:MarkReturns the number of regions in this mark.- Specified by:
numberRegionsin classMark- Returns:
- the number of regions
-
equalsDeep
Description copied from class:MarkWithPositionChecks if this mark is equal to another mark by comparing all attributes.- Overrides:
equalsDeepin classMarkWithPosition- Parameters:
mark- the mark to compare with- Returns:
- true if the marks are equal, false otherwise
-
strMarks
Returns a string representation of the mark's attributes.- Returns:
- a string containing the radius value
-
setRadius
public void setRadius(double radius) Sets the radius of the mark.- Parameters:
radius- the new radius value
-
radiusForRegion
protected double radiusForRegion(int regionID) Calculates the radius for a specific region.- Parameters:
regionID- the ID of the region- Returns:
- the radius for the specified region
-
radiusForRegionSquared
protected double radiusForRegionSquared(int regionID) Calculates the squared radius for a specific region.- Parameters:
regionID- the ID of the region- Returns:
- the squared radius for the specified region
-
getRadius
public double getRadius() -
getBoundRadius
-