new Cesium.Ray(origin, direction)

代表从所提供的来源向提供方向无限延伸的射线.
Name Type Default Description
origin Cartesian3 Cartesian3.ZERO optional The origin of the ray.
direction Cartesian3 Cartesian3.ZERO optional The direction of the ray.

Members

direction : Cartesian3

射线的方向.

origin : Cartesian3

射线的起源.
Default Value: Cartesian3.ZERO

Methods

static Cesium.Ray.clone(ray, result)Ray

重复一个雷的例子.
Name Type Description
ray Ray 射线重复.
result Ray optional 存储结果的对象 .
Returns:
The modified result parameter or a new Ray instance if one was not provided. (Returns undefined if ray is undefined)

static Cesium.Ray.getPoint(ray, t, result)Cartesian3

计算 r(t) = o + t*d 给定的射线点, o是射线的源头,d是方向.
Name Type Description
ray Ray The ray.
t number 一个标价.
result Cartesian3 optional 结果存储的对象.
Returns:
修改后的结果参数, 如果没有提供新实例 .
Example:
//Get the first intersection point of a ray and an ellipsoid.
const intersection = Cesium.IntersectionTests.rayEllipsoid(ray, ellipsoid);
const point = Cesium.Ray.getPoint(ray, intersection.start);
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.