struct PF2d::Ray(T)

Overview

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

Defined in:

pf2d/ray.cr

Constructors

Macro Summary

Instance Method Summary

Constructor Detail

def self.new(pos : T, dir : T) #

[View source]

Macro Detail

macro [](*args) #

[View source]

Instance Method Detail

def at(t : Float) #

Return the point at distance t along the ray


[View source]
def closest_point(p) #

[View source]
def dir : T #

[View source]
def dir=(dir : T) #

[View source]
def distance_to(p) #

[View source]
def intersect?(other) #

[View source]
def normal #

[View source]
def pos : T #

[View source]
def pos=(pos : T) #

[View source]
def 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


[View source]
def 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


[View source]
def to_line(t : Float64) #

[View source]