using System; using System.Collections.Generic; using System.Text; using SalsaModel.Scheduling; namespace SalsaModel.Actions { /// /// This action simply tracks the movement of one hand with another. /// It is very simple, and makes no attempt to adjust distances or anything. /// /// It is useful in situations where, conceptually, the man is leading /// the woman through her frame, but in fact she's the one who actually knows /// what's going on! Eg, SR turn. /// class JustFollowWithHand : IAction { SalsaMover _handFollower; PositionModel.Side _followSide; SalsaMover _handLeader; PositionModel.Side _leadSide; public JustFollowWithHand(SalsaMover handFollower, PositionModel.Side followSide, SalsaMover leadingHandOwner, PositionModel.Side leadSide) { _handFollower = handFollower; _followSide = followSide; _handLeader = leadingHandOwner; _leadSide = leadSide; } public void Start() { } public void Update(double percent) { // we're just following -- no premeditation or anything _handFollower.Model.GetArm(_followSide).Wrist = _handLeader.Model.GetArm(_leadSide).Wrist; _handFollower.AlignElbow(_followSide, SalsaMover.ElbowStyle.Out); } public void End() { } public string DescriptiveCode { get { return "follow hand"; } } } }