We currently have Collision and CollisionRule. These rely on the
rule engine to detect collisions after a call. These are no longer
used for breathing though.
breathe now has the internal function next_collision which
searches for a single collision and returns a two element vector of
the Dancers who've collided.
We've introduced the notion of playmates to inform which direction the
colliding dancers should be moved. A colliding dancer's playmate is
the other dancer in the TwoDancerFormation the call is being
performed on.
Suppose we have a BeforeEightChain formation - that's two
FacingCouples formations where the center Couples are
BackToBack. after Everyone _StepToAWave, there will be 4
collisions, but only two of them need be applied, otherwise the
dancers will be spread apart twice as much as is needed.
For this reason, breathe consideres the collisions one at a time,
moves dancers as needed to resolve that collision, and then does a new
collision search.
Another case that might require breating is PutCentersIn (not yet
implemented). Here the centers are a Couple and the ends need to move
apart. Maybe this is hand coded rather than relying on breathing. More
breathing is required after the ends separate though.
Is there a case where there's a collision but no single playmate?
We currently have
Collision
andCollisionRule
. These rely on the rule engine to detect collisions after a call. These are no longer used for breathing though.breathe
now has the internal functionnext_collision
which searches for a single collision and returns a two element vector of theDancer
s who've collided.We've introduced the notion of playmates to inform which direction the colliding dancers should be moved. A colliding dancer's playmate is the other dancer in the
TwoDancerFormation
the call is beingperform
ed on.Suppose we have a
BeforeEightChain
formation - that's twoFacingCouples
formations where the centerCouple
s areBackToBack
. afterEveryone _StepToAWave
, there will be 4 collisions, but only two of them need be applied, otherwise the dancers will be spread apart twice as much as is needed.For this reason,
breathe
consideres the collisions one at a time, moves dancers as needed to resolve that collision, and then does a new collision search.Another case that might require breating is
PutCentersIn
(not yet implemented). Here the centers are a Couple and the ends need to move apart. Maybe this is hand coded rather than relying on breathing. More breathing is required after the ends separate though.Is there a case where there's a collision but no single playmate?