我使用以下代码在HelixViewport3D中绘制一个球体。现在我想在两个球体之间创建一条线。请提出任何建议。
由于
var meshBuilder = new MeshBuilder(false, false);
meshBuilder.AddSphere(new Point3D(0, 0, 0), 0.1f, 10, 10);
var mesh = meshBuilder.ToMesh(true);
modelGroup = new Model3DGroup();
var greenMaterial = MaterialHelper.CreateMaterial(Colors.Green);
var insideMaterial = MaterialHelper.CreateMaterial(Colors.Yellow);
mygeometry = new GeometryModel3D();
mygeometry.Material = greenMaterial;
mygeometry.BackMaterial = insideMaterial;
mygeometry.Geometry = mesh;
modelGroup.Children.Add(mygeometry);
myModelVisual3D = new ModelVisual3D();
myModelVisual3D.Content = modelGroup;
myview.Children.Clear();
myview.Children.Add(myModelVisual3D);