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

Use a RigidMotion instead of multiple parameters when passing a part to the plugin #2382

Merged
merged 3 commits into from
Nov 29, 2019

Conversation

pleroy
Copy link
Member

@pleroy pleroy commented Nov 29, 2019

No description provided.

ksp_plugin/plugin.cpp Outdated Show resolved Hide resolved
@@ -461,6 +459,9 @@ void Plugin::InsertOrKeepLoadedPart(
main_body_frame.FromThisFrameAtTime(previous_time) *
world_to_main_body_centred;

DegreesOfFreedom<World> const part_degrees_of_freedom(
part_rigid_motion.rigid_transformation()(RigidPart::origin),
part_rigid_motion.Inverse().velocity_of_to_frame_origin());
Copy link
Member

Choose a reason for hiding this comment

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

Don't handle the velocity and position separately; that's how you get bugs, see 8aa5e56.

part_rigid_motion(DegreesOfFreedom<RigidPart>{RigidPart::origin, Velocity<RigidPart>{}}).

We should probably have an UnmovingOrigin to construct those specific degrees of freedom more easily, but that's a job for a separate pull request.

Copy link
Member Author

Choose a reason for hiding this comment

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

Klug.

Sorry, something went wrong.

@eggrobin eggrobin added the LGTM label Nov 29, 2019
@pleroy pleroy merged commit 98b8c44 into mockingbirdnest:master Nov 29, 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.

None yet

2 participants