Skip to content

Change Plugin and Celestial to operate on rotating bodies instead of massive bodies. #1286

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

Merged
merged 6 commits into from
Mar 25, 2017

Conversation

pleroy
Copy link
Member

@pleroy pleroy commented Mar 25, 2017

The physics layer still operates on massive bodies, so a few conversions are needed when crossing from ksp_plugin to physics and back.

Fix #1112.

dynamic_cast_not_null<RotatingBody<Barycentric> const*>(
system.bodies[i].release());
std::unique_ptr<RotatingBody<Barycentric> const> owned_body(unowned_body);
Index const celestial_index = bodies_to_indices[unowned_body];
Copy link
Member

Choose a reason for hiding this comment

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

overload dynamic_cast_not_null for std::unique_ptr

@eggrobin eggrobin added the LGTM label Mar 25, 2017
@eggrobin eggrobin merged commit 13d1ba1 into mockingbirdnest:master Mar 25, 2017
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.

None yet

2 participants