我在桌面里面测试了一下BOX的位置、高度什么的,然后想在组件里面去实现,但是一直没办法实现这个功能,麻烦帮忙看看哪里出问题了,感谢,代码如下:
private void toolStripButtonLayer_Click(object sender, EventArgs e)
{
GeoStyle3D geostyle3d = new GeoStyle3D();
//box风格设置
geostyle3d.AltitudeMode = AltitudeMode.ClampToGround;
geostyle3d.FillBackColor = Color.FromArgb(50, 125, 0, 0);
geostyle3d.FillForeColor = Color.FromArgb(50, 125, 0, 0);
geostyle3d.MarkerColor = Color.FromArgb(50, 125, 0, 0);
geostyle3d.LineColor = Color.FromArgb(50, 125, 0, 0);
geobox.Style3D = geostyle3d;
//box位置设置
geobox.Position = new Point3D(-140, 100, -18.95);
geobox.BottomSize = new Size2D(250, 230);
geobox.Height = 30.25;
//场景剖面
foreach (Layer3D clipLayer in sceneControlDemo.Scene.Layers)
{
clipLayer.ClipLineColor = Color.Red;
clipLayer.ClipByBox(geobox, BoxClipPart.ClipOuter);
//clipLayer.UpdateData();
}
}