Class: Ray

Ray

new Ray(originopt, directionopt)

Represents a ray that extends infinitely from the provided origin in the provided direction.
Parameters:
Name Type Attributes Default Description
origin Cartesian3 <optional>
Cartesian3.ZERO The origin of the ray.
direction Cartesian3 <optional>
Cartesian3.ZERO The direction of the ray.
Source:

Members

direction :Cartesian3

The direction of the ray.
Type:
Source:

origin :Cartesian3

The origin of the ray.
Type:
Default Value:
Source:

Methods

(static) getPoint(ray, t, resultopt) → {Cartesian3}

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