Class Ray2D

    • Constructor Detail

      • Ray2D

        public Ray2D​(double x1,
                     double y1,
                     double x2,
                     double y2)
        Two-point-coordinate constructor. The direction is relative to the origin. The ray goes through both points.
        Parameters:
        x1 - x-coordinate of origin
        y1 - y-coordinate of origin
        x2 - x-coordinate of direction
        y2 - y-coordinate of direction
    • Method Detail

      • render

        public Line2D render​(double distance)
        Render the ray as a scaled line.
        Parameters:
        distance - scaling factor to render the line
        Returns:
        a line simulating an infinite ray