struct

PF2d::Ray(T)

Inherits Struct < Value < Object

Represents an infinite line by position pos and direction dir dir should be normalized

Constructors

new(pos : T, dir : T)
Source

Instance methods

at(t : Float)

Return the point at distance t along the ray

Source
closest_point(p)
Source
dir=(dir : T)
Source
distance_to(p)
Source
intersect?(other)
Source
normal
Source
pos=(pos : T)
Source
project(x, y)

Return the projection of the point p onto this ray forms a right triangle with the ray and the line between p and the projection

Source
project(p)

Return the projection of the point p onto this ray forms a right triangle with the ray and the line between p and the projection

Source
to_line(t : Float64)
Source

Macros

[](*args)
Source