The goog.vec.Ray Class

goog.vec.Ray(opt_origin, opt_dir)

Constructs a new ray with an optional origin and direction. If not specified, the default is [0, 0, 0].

opt_origin {goog.vec.Vec3.AnyType=}
The optional origin.
opt_dir {goog.vec.Vec3.AnyType=}
The optional direction.

.dir {goog.vec.Vec3.Number}

.equals(other)

Returns true if this ray is equal to the other ray.

other {goog.vec.Ray}
The other ray.
returns {boolean}
True if this ray is equal to the other ray.

.origin {goog.vec.Vec3.Number}

.set(origin, dir)

Sets the origin and direction of the ray.

origin {goog.vec.AnyType}
The new origin.
dir {goog.vec.AnyType}
The new direction.

.setDir(dir)

Sets the direction of the ray.

dir {goog.vec.AnyType}
The new direction.

.setOrigin(origin)

Sets the origin of the ray.

origin {goog.vec.AnyType}
the new origin.