English中文

ClippingPolygon

new Cesium.ClippingPolygon(options)

要使用的测地线多边形 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:
名称 Name 类型 Type 默认值 Default 说明 Description
positions Array.<Cartesian3> 定义剪裁多边形外环的三个或更多笛卡尔坐标的列表。 A list of three or more Cartesian coordinates defining the outer ring of the clipping polygon.
ellipsoid Ellipsoid Ellipsoid.default 可选 optional
示例: 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

返回剪裁时用于将多边形投影到曲面上的椭球体。 Returns the ellipsoid used to project the polygon onto surfaces when clipping.
返回多边形中的位置总数,包括所有孔。 Returns the total number of positions in the polygon, include any holes.
返回位置的外环。 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

static Cesium.ClippingPolygon.equals(left, right)boolean

比较提供的 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.
计算一个制图矩形,该矩形包围由位置列表定义的多边形,包括国际日期变更线和极点上的情况。 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
需要帮助吗?获得答案的最快方法是从社区和团队那里获得答案 Need help? The fastest way to get answers is from the community and team on the Cesium Forum.