本文整理汇总了C#中Orbit.getPositionFromEccAnomaly方法的典型用法代码示例。如果您正苦于以下问题:C# Orbit.getPositionFromEccAnomaly方法的具体用法?C# Orbit.getPositionFromEccAnomaly怎么用?C# Orbit.getPositionFromEccAnomaly使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Orbit
的用法示例。
在下文中一共展示了Orbit.getPositionFromEccAnomaly方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateLine
/// <summary>
/// Creates a Vectrosity Line using an orbit
/// </summary>
public VectorLine CreateLine(double inclination, double lan, VectorLine line = null)
{
if (line == null)
{
line = new VectorLine(body.name + " SOI", new Vector3[360 / 15 * 8 * 2], color, MapView.OrbitLinesMaterial, 5f, LineType.Discrete);
line.vectorObject.transform.parent = ScaledSpace.Instance.transform;
line.vectorObject.renderer.castShadows = false;
line.vectorObject.renderer.receiveShadows = false;
line.layer = 31;
}
line.vectorObject.renderer.material = MapView.OrbitLinesMaterial;
Vector3[] points = new Vector3[(int)Math.Floor(360 / 15d)];
Orbit orbit = new Orbit(inclination, 0, radius, lan, 0, 0, 0, body);
for (int i = 0; i < Math.Floor(360 / 15d); i++)
{
points[i] = ScaledSpace.LocalToScaledSpace(orbit.getPositionFromEccAnomaly(i * 15 * Math.PI / 180));
}
Vector.MakeSplineInLine(line, points, true);
Vector.SetColor(line, color);
return line;
}