Ray2

Type Alias Ray2 

Source
pub type Ray2<S> = Ray<S, Point2<S>, Vector2<S>>;
Expand description

2D ray

Aliased Type§

pub struct Ray2<S> {
    pub origin: Point2<S>,
    pub direction: Vector2<S>,
    /* private fields */
}

Fields§

§origin: Point2<S>

Ray origin

§direction: Vector2<S>

Normalized ray direction

Trait Implementations§

Source§

impl<S: BaseFloat> Continuous<Aabb2<S>> for Ray2<S>

Source§

type Result = Point2<S>

Result returned by the intersection test
Source§

fn intersection(&self, aabb: &Aabb2<S>) -> Option<Point2<S>>

Intersection test
Source§

impl<S: BaseFloat> Continuous<Line<S, Vector2<S>, Point2<S>>> for Ray2<S>

Determines if an intersection between a ray and a line segment is found.

Source§

type Result = Point2<S>

Result returned by the intersection test
Source§

fn intersection(&self, line: &Line2<S>) -> Option<Point2<S>>

Intersection test
Source§

impl<S: BaseFloat> Discrete<Aabb2<S>> for Ray2<S>

Source§

fn intersects(&self, aabb: &Aabb2<S>) -> bool

Intersection test