Example #1
0
 public MakeParticleCommand(Simulator sim, MarkerManager marker, Vector2 pos)
 {
     _sim    = sim;
     _marker = marker;
     _pos    = pos;
     _uid    = -1;
 }
        public DeleteParticleCommand(Simulator sim, MarkerManager marker, int uid)
        {
            _sim    = sim;
            _marker = marker;
            _uid    = uid;

            _p   = sim.GetParticleByUID(uid);
            _pos = _p.pos;
        }
        public MakeSpringCommand(Simulator sim, MarkerManager marker, int aUID, int bUID, float stiffness)
        {
            _sim    = sim;
            _marker = marker;
            _uid    = -1;

            _aUID      = aUID;
            _bUID      = bUID;
            _stiffness = stiffness;
        }
Example #4
0
        public DeleteSpringCommand(Simulator sim, MarkerManager marker, int uid)
        {
            _sim    = sim;
            _marker = marker;
            _uid    = uid;

            _s         = _sim.GetSpringByUID(uid);
            _aUID      = _s.a.uid;
            _bUID      = _s.b.uid;
            _stiffness = _s.stiffness;
        }
Example #5
0
        public DeleteAngleCommand(Simulator sim, MarkerManager marker, int uid)
        {
            _sim    = sim;
            _marker = marker;
            _uid    = uid;

            _a         = _sim.GetAngleByUID(uid);
            _aUID      = _a.a.uid;
            _bUID      = _a.b.uid;
            _mUID      = _a.m.uid;
            _stiffness = _a.stiffness;
        }
Example #6
0
 public static void DeleteParticleMarker(
     MarkerManager marker, Particle p,
     List <SpringConstraint> springs, List <AngleConstraint> angles, List <PinConstraint> pins
     )
 {
     marker.DeleteParticleMarker(p);
     for (var i = 0; i < springs.Count; ++i)
     {
         marker.DeleteSpringMarker(springs[i]);
     }
     for (var i = 0; i < angles.Count; ++i)
     {
         marker.DeleteAngleMarker(angles[i]);
     }
 }
Example #7
0
 public void DeleteAngle(Simulator sim, MarkerManager marker, int uid)
 {
     _stack.ExeCommand(new DeleteAngleCommand(sim, marker, uid));
 }
Example #8
0
 public void MakeAngle(Simulator sim, MarkerManager marker, int aUID, int bUID, int mUID, float stiffness)
 {
     _stack.ExeCommand(new MakeAngleCommand(sim, marker, aUID, bUID, mUID, stiffness));
 }
Example #9
0
 public void MakeParticle(Simulator sim, MarkerManager marker, Vector2 pos)
 {
     _stack.ExeCommand(new MakeParticleCommand(sim, marker, pos));
 }