表示从提供的原点沿指定方向无限延伸的光线。
Name | Type | Default | Description |
---|---|---|---|
origin |
Cartesian3 |
Cartesian3.ZERO
|
optional 射线的起源。 |
direction |
Cartesian3 |
Cartesian3.ZERO
|
optional 光线的方向。 |
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:
修改后的结果参数或新的光线实例(如果未提供)。(如果光线未定义,则返回未定义)
static Cesium.Ray.getPoint(ray, t, result) → Cartesian3
计算沿r(t)=o+t*d给出的光线的点,
其中o是光线的原点,d是方向。
Name | Type | Description |
---|---|---|
ray |
Ray | 射线。 |
t |
Number | 标量值。 |
result |
Cartesian3 | optional 将存储结果的对象。 |
Returns:
修改后的结果参数,或新实例(如果未提供)。
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);