var planeGeometry = Cesium.Geometry.Plane.createPlaneGeometry(origin, normal, width, height);
参数说明:
- origin:Plane的原点,即法线与平面相交的点。
- normal:Plane的法线,用于定义平面的方向。
- width:Plane的宽度。
- height:Plane的高度。
该方法返回一个裁剪面的几何体对象,可以将其作为实体(Entity)的几何形状(geometry)使用,例如:
var planeGeometry = Cesium.Geometry.Plane.createPlaneGeometry(origin, normal, width, height);
var planeInstance = new Cesium.GeometryInstance({geometry : planeGeometry,attributes : {color : Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.GREEN)}
});
viewer.scene.primitives.add(new Cesium.Primitive({geometryInstances : planeInstance,appearance : new Cesium.PerInstanceColorAppearance()
}));
这段代码将创建一个绿色的裁剪平面,并将其添加到场景中。用户可以通过修改裁剪平面的origin、normal、width和height参数来改变裁剪平面的位置和大小,从而实现管网剖面分析的功能。