Ray

Ray

Class representing a horizontal ray, used by ray shooting algorithm

Constructor

new Ray(pt)

Construct ray by setting start point
Source:
Parameters:
Name Type Description
pt Point start point

Classes

Ray

Members

box

Returns half-infinite bounding box of the ray
Source:

norm

Return ray normal vector (0,1) - horizontal ray
Source:

start

Return ray start point
Source:

Methods

clone() → {Ray}

Returns copied instance of the ray object
Source:
Returns:
Type:
Ray

intersect(shape) → {Array}

Returns array of intersection points between ray and segment or arc
Source:
Parameters:
Name Type Description
shape Segment | Arc Shape to intersect with ray
Returns:
Type:
Array
array of intersection points