Ray

class Ray()

Object representing a Ray.

Index

Constructors

Properties

Methods

Constructors

Ray.constructor()
Ray(origin: Point3, direction: Point3): Ray

Parameters

origin: Point3

direction: Point3

Returns: Ray

Properties

Ray.direction
direction: Point3
Ray.origin
origin: Point3

Methods

Ray.assign()
assign(ray: Ray): this

Sets this ray equal to another ray

Parameters

ray: Ray

the ray to assign

Returns: this

Ray.copy()
copy(): Ray

Creates a copy of this ray

Returns: Ray

a copy of this ray object
Ray.negate()
negate(): this

Flips the ray’s direction.

Returns: this