Skip to content
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

Show nodes with respect to the equator #2170

Merged
merged 17 commits into from
May 19, 2019

Conversation

eggrobin
Copy link
Member

This fixes #1841.

&*renderer_->GetPlottingFrame());
if (cast_plotting_frame != nullptr) {
auto const& plotting_frame = *cast_plotting_frame;
auto const centre = dynamic_cast_not_null<RotatingBody<Barycentric> const*>(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do *dynamic_cast_not_null and you'll avoid all the -> below.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dynamic_cast_not_null<OblateBody<Barycentric> const*>(centre) below, and that becomes &dynamic_cast<OblateBody<Barycentric> const&>(centre), which, being passed as a not_null parameter, induces a gratuitous nullness check.
Do we want that?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I missed that.

ksp_plugin/plugin.cpp Outdated Show resolved Hide resolved
ksp_plugin/plugin.cpp Outdated Show resolved Hide resolved
ksp_plugin_adapter/ksp_plugin_adapter.cs Outdated Show resolved Hide resolved
ksp_plugin_adapter/map_node_pool.cs Outdated Show resolved Hide resolved
ksp_plugin_adapter/map_node_pool.cs Outdated Show resolved Hide resolved
ksp_plugin/plugin.cpp Outdated Show resolved Hide resolved
ksp_plugin/plugin.cpp Outdated Show resolved Hide resolved
ksp_plugin_adapter/ksp_plugin_adapter.cs Outdated Show resolved Hide resolved
ksp_plugin_adapter/ksp_plugin_adapter.cs Outdated Show resolved Hide resolved
ksp_plugin_adapter/map_node_pool.cs Show resolved Hide resolved
ksp_plugin_adapter/map_node_pool.cs Outdated Show resolved Hide resolved
@@ -192,13 +218,13 @@ public enum NodeSource {
properties.object_type == MapObject.ObjectType.Periapsis
? "Periapsis"
: "Apoapsis";
CelestialBody celestial = properties.celestial;
CelestialBody celestial =
properties.reference_frame.selected_celestial;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would fit on previous line?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No.

caption.captionLine2 =
$"{speed:N0} m/s".ToString(Culture.culture);
break;
}
case MapObject.ObjectType.PatchTransition: {
CelestialBody celestial =
properties.reference_frame.selected_celestial;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would fit on previous line?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No.

ksp_plugin_adapter/reference_frame_selector.cs Outdated Show resolved Hide resolved
physics/apsides.hpp Outdated Show resolved Hide resolved
@eggrobin eggrobin merged commit 8d7cc4b into mockingbirdnest:master May 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show ☊ and ☋ with respect to the equator in body-centred inertial frames
2 participants