Class Ellipse

All Implemented Interfaces:
Serializable

public class Ellipse extends ConicBase implements Serializable
Represents a 2D ellipse mark.
See Also:
  • Constructor Details

    • Ellipse

      public Ellipse()
      Creates a new Ellipse with default values.
    • Ellipse

      public Ellipse(Ellipse source)
      Creates a new Ellipse by copying an existing one.
      Parameters:
      source - the Ellipse to copy
  • Method Details

    • getName

      public String getName()
      Description copied from class: Mark
      Returns the name of this mark type.
      Specified by:
      getName in class Mark
      Returns:
      the name of the mark
    • isPointInside

      public final byte isPointInside(Point3i point)
      Description copied from class: Mark
      Determines if a point is inside the mark.
      Specified by:
      isPointInside in class Mark
      Parameters:
      point - the point to check
      Returns:
      a byte representing the region membership of the point
    • volume

      public double volume(int regionID)
      Description copied from class: Mark
      Calculates the volume of a specific region of the mark.
      Specified by:
      volume in class Mark
      Parameters:
      regionID - the ID of the region
      Returns:
      the volume of the region
    • circumference

      public double circumference(int regionID)
      Calculates the circumference of the ellipse for a given region.
      Parameters:
      regionID - the ID of the region
      Returns:
      the circumference of the ellipse
    • duplicate

      public Ellipse duplicate()
      Description copied from class: Mark
      Creates a duplicate of this mark.
      Specified by:
      duplicate in class Mark
      Returns:
      a new Mark instance that is a copy of this one
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • updateshell

      public void updateshell(double shell)
      Updates the shell size and recalculates internal values.
      Parameters:
      shell - the new shell size as a ratio of the radius
    • setMarksExplicit

      public void setMarksExplicit(Point3d position, Orientation orientation, Point2d radii)
      Sets the marks explicitly with position, orientation, and radii.
      Parameters:
      position - the 3D position of the ellipse
      orientation - the orientation of the ellipse
      radii - the radii of the ellipse
    • setMarksExplicit

      public void setMarksExplicit(Point3d position)
      Description copied from class: ConicBase
      Sets the mark's position explicitly.
      Specified by:
      setMarksExplicit in class ConicBase
      Parameters:
      position - the position of the mark
    • setMarksExplicit

      public void setMarksExplicit(Point3d position, Orientation orientation)
      Description copied from class: ConicBase
      Sets the mark's position and orientation explicitly.
      Specified by:
      setMarksExplicit in class ConicBase
      Parameters:
      position - the position of the mark
      orientation - the orientation of the mark
    • setMarksExplicit

      public void setMarksExplicit(Point3d position, Orientation orientation, Point3d radii)
      Description copied from class: ConicBase
      Sets the mark's properties explicitly.
      Specified by:
      setMarksExplicit in class ConicBase
      Parameters:
      position - the position of the mark
      orientation - the orientation of the mark
      radii - the radii of the mark
    • box

      public BoundingBox box(Dimensions dimensions, int regionID)
      Description copied from class: Mark
      Calculates the bounding box for a specific region of the mark.
      Specified by:
      box in class Mark
      Parameters:
      dimensions - the dimensions of the space
      regionID - the ID of the region
      Returns:
      the bounding box
    • quickOverlap

      public Optional<QuickOverlapCalculation> quickOverlap()
      Description copied from class: Mark
      Provides an optional quick overlap calculation method.
      Overrides:
      quickOverlap in class Mark
      Returns:
      an Optional containing a QuickOverlapCalculation, or empty if not available
    • setMarks

      public void setMarks(Point2d radii, Orientation orientation)
      Sets the marks with radii and orientation.
      Parameters:
      radii - the radii of the ellipse
      orientation - the orientation of the ellipse
    • scaleRadii

      public void scaleRadii(double multFactor)
      Scales the radii of the ellipse.
      Parameters:
      multFactor - the factor to multiply the radii by
    • scale

      public void scale(ScaleFactor scaleFactor) throws CheckedUnsupportedOperationException
      Description copied from class: Mark
      Scales the mark in X and Y dimensions.
      Overrides:
      scale in class MarkWithPosition
      Parameters:
      scaleFactor - how much to scale by
      Throws:
      CheckedUnsupportedOperationException - if scaling is not supported for this mark type
    • equalsDeep

      public boolean equalsDeep(Mark mark)
      Description copied from class: MarkWithPosition
      Checks if this mark is equal to another mark by comparing all attributes.
      Overrides:
      equalsDeep in class MarkWithPosition
      Parameters:
      mark - the mark to compare with
      Returns:
      true if the marks are equal, false otherwise
    • numberDimensions

      public int numberDimensions()
      Description copied from class: Mark
      Returns the number of dimensions of this mark.
      Specified by:
      numberDimensions in class Mark
      Returns:
      the number of dimensions
    • createRadiiArray

      public double[] createRadiiArray()
      Description copied from class: ConicBase
      Creates an array of radii in their original units.
      Specified by:
      createRadiiArray in class ConicBase
      Returns:
      an array of radii
    • createRadiiArrayResolved

      public double[] createRadiiArrayResolved(Optional<Resolution> resolution)
      Description copied from class: ConicBase
      Creates an array of radii resolved to the given resolution.
      Specified by:
      createRadiiArrayResolved in class ConicBase
      Parameters:
      resolution - an optional resolution to consider
      Returns:
      an array of resolved radii
    • numberRegions

      public int numberRegions()
      Description copied from class: Mark
      Returns the number of regions in this mark.
      Specified by:
      numberRegions in class Mark
      Returns:
      the number of regions
    • boxAllRegions

      public BoundingBox boxAllRegions(Dimensions dimensions)
      Description copied from class: Mark
      Calculates the bounding box for all regions of the mark.
      Specified by:
      boxAllRegions in class Mark
      Parameters:
      dimensions - the dimensions of the space
      Returns:
      the bounding box
    • getShell

      public double getShell()
      The size of the shell, expressed as a ratio of the radius.
    • setShell

      public void setShell(double shell)
      The size of the shell, expressed as a ratio of the radius.
    • getRadii

      public Point2d getRadii()
    • getOrientation

      public Orientation getOrientation()