Beispiel #1
0
		private void DrawIcon(double longitude, double latitude, SCANicon.OrbitIcon icon, Color iconColor)
		{
			Vector2 pos = new Vector2((float)(longitudeToPixels(longitude, latitude)),(float)(latitudeToPixels(longitude, latitude)));

			SCANicon.drawOrbitIconGL((int)pos.x, (int)pos.y, icon, iconColor, iconColorShadowValue, iconMaterial, 16, true);
		}
Beispiel #2
0
		private void DrawOrbitIcon(Vessel thatVessel, SCANicon.OrbitIcon iconType, Color iconColor, double givenPoint = 0)
		{
			double timePoint = start;
			switch (iconType) {
				case SCANicon.OrbitIcon.Ap:
					timePoint += thatVessel.orbit.timeToAp;
					break;
				case SCANicon.OrbitIcon.Pe:
					timePoint += thatVessel.orbit.timeToPe;
					break;
				case SCANicon.OrbitIcon.AN:
				case SCANicon.OrbitIcon.DN:
				case SCANicon.OrbitIcon.ManeuverNode:
					timePoint = givenPoint;
					break;
				default:
					iconType = SCANicon.orbitIconForVesselType(thatVessel.vesselType);
					break;
			}

			if (JUtil.OrbitMakesSense(thatVessel)) {
				bool collision;
				Vector2d coord;
				if (GetPositionAtT(thatVessel, thatVessel.orbit, start, timePoint, out coord, out collision) && !collision) {
					DrawIcon(coord.x, coord.y, iconType, iconColor);
				}
			}
		}