-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plot trajectories using meshes in scaled space #3303
Conversation
|
||
// Do not plot the past when there is a target vessel as it is misleading. | ||
// TODO(egg): This is the future, not the past! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incomprehensible comment is incomprehensible. If the preceding comment is false, fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment is possibly false, but then the code would be false too. This should to be investigated separately.
private GLLines.Style target_history_style = GLLines.Style.Faded; | ||
private UnityEngine.Color target_prediction_colour = XKCDColors.LightMauve; | ||
private GLLines.Style target_prediction_style = GLLines.Style.Solid; | ||
// TODO(egg): move all of that to the plotter once the RP2 lines are gone. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When is that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now. But let’s deal with that in another PR.
As far as performance is concerned, this means that we no longer need to do projection nor hiding in the plot method; further, by directly setting vertices in an array pre-allocated on the C#, we avoid the costly iteration over the RP2Line.
In extremely noodly cases where plotting would drive the frame rate down to 2 or 3 FPS, this improves the framerate by a factor of 4 or 5.
In addition, this means that the trajectories are hidden behind the actual scaled space bodies, and not behind fictitious spheres; this means that in the surface frame, the impact point will be accurately visible (though it still is not indicated by any sort of marker; the impact marker at underground periapsides is unaffected by this change).
This should help with #3035.