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

Get rid of ApparentBubble #2564

Merged
merged 9 commits into from
May 10, 2020
Merged

Conversation

eggrobin
Copy link
Member

Add an ApparentWorld for consistency: uncorrected coordinates come in as ApparentWorld, are converted to Apparent, then to ApparentPileUp via a MechanicalSystem in the PileUp.

The correction produces NonRotatingPileUp coordinates, which eventually make it back to the game in World.

RigidMotion<RigidPart, ApparentBubble>::MakeNonRotatingMotion(
DegreesOfFreedom<ApparentBubble>::ReadFromMessage(
RigidMotion<RigidPart, Apparent>::MakeNonRotatingMotion(
DegreesOfFreedom<Apparent>::ReadFromMessage(
degrees_of_freedom)));
Copy link
Member

Choose a reason for hiding this comment

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

Might fit on the previous line.

@@ -156,7 +156,8 @@ inline not_null<std::unique_ptr<MassiveBody>> MassiveBody::ReadFromMessage(
switch (static_cast<Tag>(enum_value_descriptor->number())) {
ROTATING_BODY_TAG_VALUE_CASE(ALICE_SUN);
ROTATING_BODY_TAG_VALUE_CASE(ALICE_WORLD);
ROTATING_BODY_TAG_VALUE_CASE(APPARENT_BUBBLE);
ROTATING_BODY_TAG_VALUE_CASE(APPARENT);
ROTATING_BODY_TAG_VALUE_CASE(APPARENT_WORLD);
Copy link
Member

Choose a reason for hiding this comment

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

Also add PILE_UP_PRINCIPAL_AXES, it's missing in this statement.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done, but we should probably restrict this if not to the frames we actually want to use for bodies, at least to inertial ones which is a requirement of RotatingBody

@@ -65,7 +65,8 @@ class RigidMotion final {

template<typename F = FromFrame,
typename T = ToFrame,
typename = std::enable_if_t<std::is_same_v<F, T>>>
typename = typename = std::enable_if_t<
F::handedness == T::handedness && F::motion <= T::motion>>
Copy link
Member

Choose a reason for hiding this comment

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

This needs a comment.

eggrobin added 6 commits May 10, 2020 15:55

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@pleroy pleroy added the LGTM label May 10, 2020
@eggrobin eggrobin merged commit 1e25c73 into mockingbirdnest:master May 10, 2020
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