你好,我编辑模型,移动了位置,并做了旋转。我获取Feature3D.Geometry.Position数值的确有变化,可是Feature3D.Geometry.RotationZ一直是0.要如何获取变化后的RotationZ?
if (null == sceneControl || string.IsNullOrWhiteSpace(layerName))
return;
var layerKML = m_SceneControlHelper.GetLayer3DKML(sceneControl, layerName);
if (null == layerKML||null== layerKML.Features|| layerKML.Features.Count<=0)
return;
var features = layerKML.Features.GetFeatureArray(Feature3DSearchOption.AllFeatures);
if (null == features || features.Length <= 0)
return;
features.ToList().ForEach(feature =>
{
if (string.IsNullOrWhiteSpace(feature.Name))
throw new Exception("if(string.IsNullOrWhiteSpace(feature.Name))");
var smID = Convert.ToInt32(feature.Name);
Dictionary<string, object> values = new Dictionary<string, object>();
values.Add(LocalConstsFields.Height, feature.Geometry.Position.Z);
values.Add(LocalConstsFields.RotationZ, feature.Geometry.RotationZ);
var geometry = new GeoPoint { X = feature.Geometry.Position.X, Y = feature.Geometry.Position.Y };
RecordsetHelper.UpdateGeometry(LocalVariables.SpatialDatasourceConnectionInfo, layerName, smID, geometry, values);
});