要使用的测地线多边形 A geodesic polygon to be used with
ClippingPlaneCollection 用于有选择地隐藏模型、3D 图块集或地球中的区域。 for selectively hiding regions in a model, a 3D tileset, or the globe.
| 名称 Name | 类型 Type | 说明 Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
具有以下属性的对象: Object with the following properties:
|
示例: Example:
const positions = Cesium.Cartesian3.fromRadiansArray([
-1.3194369277314022,
0.6988062530900625,
-1.31941,
0.69879,
-1.3193955980204217,
0.6988091578771254,
-1.3193931220959367,
0.698743632490865,
-1.3194358224045408,
0.6987471965556998,
]);
const polygon = new Cesium.ClippingPolygon({
positions: positions
});
成员 Members
readonly ellipsoid : Ellipsoid
返回剪裁时用于将多边形投影到曲面上的椭球体。 Returns the ellipsoid used to project the polygon onto surfaces when clipping.
返回多边形中的位置总数,包括所有孔。 Returns the total number of positions in the polygon, include any holes.
readonly positions : Array.<Cartesian3>
返回位置的外环。 Returns the outer ring of positions.
方法 Methods
static Cesium.ClippingPolygon.clone(polygon, result) → ClippingPolygon
克隆 ClippingPolygon 而不设置其所有权。 Clones the ClippingPolygon without setting its ownership.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
polygon |
ClippingPolygon | 要克隆的 ClippingPolygon The ClippingPolygon to be cloned |
result |
ClippingPolygon | 可选 optional 用于存储克隆参数的对象。 The object on which to store the cloned parameters. |
返回: Returns:
输入 ClippingPolygon 的克隆 a clone of the input ClippingPolygon
比较提供的 ClippingPolygons 并返回 Compares the provided ClippingPolygons and returns
true 如果它们相等, if they are equal, false otherwise.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
left |
ClippingPolygon | 第一个多边形。 The first polygon. |
right |
ClippingPolygon | 第二个多边形。 The second polygon. |
返回: Returns:
true 如果左和右相等, if left and right are equal, false otherwise.
computeRectangle(result) → Rectangle
计算一个制图矩形,该矩形包围由位置列表定义的多边形,包括国际日期变更线和极点上的情况。 Computes a cartographic rectangle which encloses the polygon defined by the list of positions, including cases over the international date line and the poles.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
result |
Rectangle | 可选 optional 用于存储结果的对象。 An object in which to store the result. |
返回: Returns:
结果矩形 The result rectangle
