public void OnPostRender() { if (Body == null || Vertices == null || Vertices.Count == 0) { return; } GLUtils.DrawPath(Body, Vertices, Color.blue, false, false); }
public void OnPostRender() { if (ImpactPosition == null || ImpactBody == null) { return; } double impactLat, impactLon, impactAlt; // get impact position, translate to latitude and longitude ImpactBody.GetLatLonAlt(ImpactPosition.Value + ImpactBody.position, out impactLat, out impactLon, out impactAlt); // draw ground marker at this position GLUtils.DrawGroundMarker(ImpactBody, impactLat, impactLon, Color.red, false, 0, markerSize); }
internal void OnPostRender() { if (Position == null || Body == null) { return; } // get impact position, translate to latitude and longitude Body.GetLatLonAlt(Position.Value, out latitude, out longitude, out altitude); // only draw if visible on the camera screen_point = FlightCamera.fetch.mainCamera.WorldToViewportPoint(Position.Value); if (!(screen_point.z >= 0 && screen_point.x >= 0 && screen_point.x <= 1 && screen_point.y >= 0 && screen_point.y <= 1)) { return; } // resize marker in respect to distance from camera. size = Mathf.Clamp(Vector3.Distance(FlightCamera.fetch.mainCamera.transform.position, Position.Value) / DIST_DIV, MIN_SIZE, MAX_SIZE); // draw ground marker at this position GLUtils.DrawGroundMarker(Body, latitude, longitude, Color, false, 0, size); }
public void OnPostRender() { if (ImpactPosition == null || ImpactBody == null) { return; } // get impact position, translate to latitude and longitude ImpactBody.GetLatLonAlt(ImpactPosition.Value + ImpactBody.position, out impactLat, out impactLon, out impactAlt); // only draw if visable on the camera screen_point = PlanetariumCamera.Camera.WorldToViewportPoint(ImpactPosition.Value + ImpactBody.position); if (!(screen_point.z > 0 && screen_point.x > 0 && screen_point.x < 1 && screen_point.y > 0 && screen_point.y < 1)) { return; } // resize marker in respect to distance from camera. cam_pos = ScaledSpace.ScaledToLocalSpace(PlanetariumCamera.Camera.transform.position) - ImpactBody.position; cross_dist = System.Math.Max(Vector3.Distance(cam_pos, ImpactPosition.Value) / 80.0d, 1.0d); // draw ground marker at this position GLUtils.DrawGroundMarker(ImpactBody, impactLat, impactLon, Color.red, false, 0, System.Math.Min(markerSize * cross_dist, 1500.0d)); }