Class BasicPathShadow2afp


  • public class BasicPathShadow2afp
    extends Object
    Shadow of a path that is used for computing the crossing values between a shape and the shadow.
    Since:
    13.0
    Version:
    17.0 2020-01-04 14:41:43
    Author:
    Stéphane GALLAND
    Maven Group Id:
    org.arakhne.afc.core
    Maven Artifact Id:
    mathgeom
    • Constructor Detail

      • BasicPathShadow2afp

        public BasicPathShadow2afp​(Path2afp<?,​?,​?,​?,​?,​?> path)
        Construct new path shadow.
        Parameters:
        path - the path that is constituting the shadow.
      • BasicPathShadow2afp

        public BasicPathShadow2afp​(PathIterator2afp<?> pathIterator,
                                   Rectangle2afp<?,​?,​?,​?,​?,​?> bounds)
        Construct new path shadow.
        Parameters:
        pathIterator - the iterator on the path that is constituting the shadow.
        bounds - the bounds of the shadow.
      • BasicPathShadow2afp

        public BasicPathShadow2afp​(PathIterator2afp<?> pathIterator,
                                   double minX,
                                   double minY,
                                   double maxX,
                                   double maxY)
        Construct new path shadow.
        Parameters:
        pathIterator - the iterator on the path that is constituting the shadow.
        minX - x coordinate of the lower corner of the shadow's bouding box.
        minY - y coordinate of the lower corner of the shadow's bouding box.
        maxX - x coordinate of the upper corner of the shadow's bouding box.
        maxY - y coordinate of the upper corner of the shadow's bouding box.
    • Method Detail

      • computeCrossings

        public int computeCrossings​(int crossings,
                                    double x0,
                                    double y0,
                                    double x1,
                                    double y1)
        Compute the crossings between this shadow and the given segment.
        Parameters:
        crossings - is the initial value of the crossings.
        x0 - is the first point of the segment.
        y0 - is the first point of the segment.
        x1 - is the second point of the segment.
        y1 - is the second point of the segment.
        Returns:
        the crossings or GeomConstants.SHAPE_INTERSECTS.