Class PointList
Object
Mark
PointListBase
PointList
- All Implemented Interfaces:
Serializable
A a list of 3D points.
Internally a set data-structure (as opposed to list) is used to store the points.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboxAllRegions
(Dimensions dimensions) Calculates the bounding box for all regions of the mark.Returns the center point of the mark.Creates a duplicate of this mark.getName()
Returns the name of this mark type.byte
isPointInside
(Point3i pointIsInside) Determines if a point is inside the mark.int
Returns the number of dimensions of this mark.int
Returns the number of regions in this mark.void
scale
(ScaleFactor scaleFactor) Scales the points in the list by a given scale factor.toString()
void
Updates the min and max points after the list of points has changed.double
volume
(int regionID) Calculates the volume of a specific region of the mark.Methods inherited from class org.anchoranalysis.mpp.mark.points.PointListBase
box, box, doDuplicate, equalsDeep, getMax, getMin, getPoints
Methods inherited from class org.anchoranalysis.mpp.mark.Mark
deriveObject, equalsID, getIdentifier, identifier, quickOverlap, setId
-
Constructor Details
-
PointList
public PointList()Constructs an empty PointList. -
PointList
Constructs a PointList from a stream of Point3d objects.- Parameters:
stream
- the stream of Point3d objects
-
-
Method Details
-
isPointInside
Description copied from class:Mark
Determines if a point is inside the mark.- Specified by:
isPointInside
in classMark
- Parameters:
pointIsInside
- the point to check- Returns:
- a byte representing the region membership of the point
-
updateAfterPointsChange
public void updateAfterPointsChange()Description copied from class:PointListBase
Updates the min and max points after the list of points has changed.- Overrides:
updateAfterPointsChange
in classPointListBase
-
duplicate
Description copied from class:Mark
Creates a duplicate of this mark. -
volume
public double volume(int regionID) Description copied from class:Mark
Calculates the volume of a specific region of the mark. -
toString
-
scale
Scales the points in the list by a given scale factor.- Specified by:
scale
in classMark
- Parameters:
scaleFactor
- the scale factor to apply- Throws:
CheckedUnsupportedOperationException
- if scaling is not supported
-
numberDimensions
public int numberDimensions()Description copied from class:Mark
Returns the number of dimensions of this mark.- Specified by:
numberDimensions
in classMark
- Returns:
- the number of dimensions
-
getName
Description copied from class:Mark
Returns the name of this mark type. -
centerPoint
Description copied from class:Mark
Returns the center point of the mark.- Specified by:
centerPoint
in classMark
- Returns:
- the center point as a Point3d
-
numberRegions
public int numberRegions()Description copied from class:Mark
Returns the number of regions in this mark.- Specified by:
numberRegions
in classMark
- Returns:
- the number of regions
-
boxAllRegions
Description copied from class:Mark
Calculates the bounding box for all regions of the mark.- Specified by:
boxAllRegions
in classMark
- Parameters:
dimensions
- the dimensions of the space- Returns:
- the bounding box
-