Appearance
KBE3D / KBCore / Cesium / ClippingPolygon
类: ClippingPolygon
A geodesic polygon to be used with ClippingPlaneCollection for selectively hiding regions in a model, a 3D tileset, or the globe.
示例
ts
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
});参数
Object with the following properties:
参数
A list of three or more Cartesian coordinates defining the outer ring of the clipping polygon.
属性
length
readonlylength:number
Returns the total number of positions in the polygon, include any holes.
positions
readonlypositions:Cartesian3[]
Returns the outer ring of positions.
ellipsoid
readonlyellipsoid:Ellipsoid
Returns the ellipsoid used to project the polygon onto surfaces when clipping.
方法
clone()
staticclone(polygon:ClippingPolygon,result?:ClippingPolygon):ClippingPolygon
Clones the ClippingPolygon without setting its ownership.
参数
polygon
ClippingPolygon
The ClippingPolygon to be cloned
result?
ClippingPolygon
The object on which to store the cloned parameters.
返回
ClippingPolygon
a clone of the input ClippingPolygon
equals()
staticequals(left:ClippingPolygon,right:ClippingPolygon):boolean
Compares the provided ClippingPolygons and returns <code>true</code> if they are equal, <code>false</code> otherwise.
参数
left
ClippingPolygon
The first polygon.
right
ClippingPolygon
The second polygon.
返回
boolean
true if left and right are equal, false otherwise.
computeRectangle()
Computes a cartographic rectangle which encloses the polygon defined by the list of positions, including cases over the international date line and the poles.
参数
result?
An object in which to store the result.
返回
The result rectangle
构造函数
构造函数
new ClippingPolygon(
options: {positions:Cartesian3[];ellipsoid?:Ellipsoid; }):ClippingPolygon
参数
options
positions
ellipsoid?
返回
ClippingPolygon
