Class Mark

Object
Mark
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
LineSegment, MarkWithPosition, PointListBase

public abstract class Mark extends Object implements Serializable
Abstract base class representing a mark in 3D space.

A mark is a geometric shape with various properties and operations.

See Also:
  • Constructor Details

    • Mark

      protected Mark(Mark source)
      Copy constructor.
      Parameters:
      source - source mark to copy from
    • Mark

      public Mark()
  • Method Details

    • isPointInside

      public abstract byte isPointInside(Point3i point)
      Determines if a point is inside the mark.
      Parameters:
      point - the point to check
      Returns:
      a byte representing the region membership of the point
    • duplicate

      public abstract Mark duplicate()
      Creates a duplicate of this mark.
      Returns:
      a new Mark instance that is a copy of this one
    • numberRegions

      public abstract int numberRegions()
      Returns the number of regions in this mark.
      Returns:
      the number of regions
    • getName

      public abstract String getName()
      Returns the name of this mark type.
      Returns:
      the name of the mark
    • quickOverlap

      public Optional<QuickOverlapCalculation> quickOverlap()
      Provides an optional quick overlap calculation method.
      Returns:
      an Optional containing a QuickOverlapCalculation, or empty if not available
    • volume

      public abstract double volume(int regionID)
      Calculates the volume of a specific region of the mark.
      Parameters:
      regionID - the ID of the region
      Returns:
      the volume of the region
    • scale

      public abstract void scale(ScaleFactor scaleFactor) throws CheckedUnsupportedOperationException
      Scales the mark in X and Y dimensions.
      Parameters:
      scaleFactor - how much to scale by
      Throws:
      CheckedUnsupportedOperationException - if scaling is not supported for this mark type
    • numberDimensions

      public abstract int numberDimensions()
      Returns the number of dimensions of this mark.
      Returns:
      the number of dimensions
    • centerPoint

      public abstract Point3d centerPoint()
      Returns the center point of the mark.
      Returns:
      the center point as a Point3d
    • box

      public abstract BoundingBox box(Dimensions dimensions, int regionID)
      Calculates the bounding box for a specific region of the mark.
      Parameters:
      dimensions - the dimensions of the space
      regionID - the ID of the region
      Returns:
      the bounding box
    • boxAllRegions

      public abstract BoundingBox boxAllRegions(Dimensions dimensions)
      Calculates the bounding box for all regions of the mark.
      Parameters:
      dimensions - the dimensions of the space
      Returns:
      the bounding box
    • equalsID

      public boolean equalsID(Object obj)
      Checks if this mark has the same ID as another object.
      Parameters:
      obj - the object to compare with
      Returns:
      true if the IDs are the same, false otherwise
    • equalsDeep

      public boolean equalsDeep(Mark mark)
      Checks if this mark is deeply equal to another mark.
      Parameters:
      mark - the mark to compare with
      Returns:
      true if the marks are deeply equal, false otherwise
    • deriveObject

      public ObjectMask deriveObject(Dimensions dimensions, RegionMembershipWithFlags region, BinaryValuesByte binaryValues)
      Creates an ObjectMask representation of the mark.
      Parameters:
      dimensions - the dimensions of the space
      region - the region membership to consider
      binaryValues - the binary values to use for encoding
      Returns:
      an ObjectMask representing the mark
    • identifier

      public String identifier()
      Returns a string identifier for the mark.
      Returns:
      a string representation of the mark's ID
    • getIdentifier

      public int getIdentifier()
      Gets the identifier of the mark.
      Returns:
      the mark's ID
    • setId

      public void setId(int id)
      Sets the identifier of the mark.
      Parameters:
      id - the ID to set