Ray

Ray

new

Represents a ray that extends infinitely from the provided origin in the provided direction.

Parameters:
Name Type Argument Default Description
origin Cartesian3 <optional>
Cartesian3.ZERO The origin of the ray.
direction Cartesian3 <optional>
Cartesian3.ZERO The direction of the ray.
Source:

Members

:Cartesian3

The direction of the ray.

:Cartesian3

The origin of the ray.
Default Value:

Methods

Computes the point along the ray given by r(t) = o + t*d, where o is the origin of the ray and d is the direction.

Parameters:
Name Type Argument Description
t Number A scalar value.
result Cartesian3 <optional>
The object in which the result will be stored.
Returns:
The modified result parameter, or a new instance if none was provided.
Example
//Get the first intersection point of a ray and an ellipsoid.
var intersection = Cesium.IntersectionTests.rayEllipsoid(ray, ellipsoid);
var point = ray.getPoint(intersection.start);