Appearance
类: Ray
Represents a ray that extends infinitely from the provided origin in the provided direction.
参数
The origin of the ray.
参数
The direction of the ray.
属性
origin
origin:
Cartesian3
The origin of the ray.
direction
direction:
Cartesian3
The direction of the ray.
方法
clone()
staticclone(ray:Ray,result?:Ray):Ray
Duplicates a Ray instance.
参数
ray
Ray
The ray to duplicate.
result?
Ray
The object onto which to store the result.
返回
Ray
The modified result parameter or a new Ray instance if one was not provided. (Returns undefined if ray is undefined)
getPoint()
staticgetPoint(ray:Ray,t:number,result?:Cartesian3):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.
参数
ray
Ray
The ray.
t
number
A scalar value.
result?
The object in which the result will be stored.
返回
The modified result parameter, or a new instance if none was provided.
示例
ts
//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);构造函数
构造函数
new Ray(
origin?:Cartesian3,direction?:Cartesian3):Ray
参数
origin?
direction?
返回
Ray
