-
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
Get rid of ApparentBubble #2564
Conversation
renderer_->WorldToBarycentric(PlanetariumRotation()) * | ||
OrthogonalMap<World, ApparentWorld>::Identity()}, | ||
Identity<World, ApparentWorld>()(renderer_->BarycentricToWorld( | ||
PlanetariumRotation())(-angular_velocity_of_world_)), |
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.
This -
sign is frightening. I wonder if we could hide it in a linear transformation (what it probably does is to convert the angular velocity of A wrt B into the angular velocity of B wrt A).
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.
Yeah this is the angular velocity of world, but we are giving the angular velocity in world (of apparent which rotates like barycentric).
I think now we have more constructors for RigidTransformation, maybe we can use the angular velocity of world more directly.
@@ -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); |
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.
Also add PILE_UP_PRINCIPAL_AXES
, it's missing in this statement.
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.
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
…
physics/rigid_motion.hpp
Outdated
@@ -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>> |
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.
This needs a comment.
Add an
ApparentWorld
for consistency: uncorrected coordinates come in asApparentWorld
, are converted toApparent
, then toApparentPileUp
via aMechanicalSystem
in thePileUp
.The correction produces
NonRotatingPileUp
coordinates, which eventually make it back to the game inWorld
.