use of artisynth.core.mechmodels.CollidablePair in project artisynth_core by artisynth.
the class SetDefaultCollisionsCommand method execute.
public void execute() {
for (CollidablePair pair : myNewBehaviors.keySet()) {
Group g0 = (Group) pair.get(0);
Group g1 = (Group) pair.get(1);
CollisionBehavior oldBehav = myMechMod.getDefaultCollisionBehavior(g0, g1);
myOldBehaviors.put(new CollidablePair(pair), new CollisionBehavior(oldBehav));
CollisionBehavior newBehav = myNewBehaviors.get(pair);
myMechMod.setDefaultCollisionBehavior(g0, g1, newBehav);
}
}
use of artisynth.core.mechmodels.CollidablePair in project artisynth_core by artisynth.
the class SetDefaultCollisionsCommand method undo.
public void undo() {
for (CollidablePair pair : myOldBehaviors.keySet()) {
CollisionBehavior oldBehav = myOldBehaviors.get(pair);
myMechMod.setDefaultCollisionBehavior((Group) pair.get(0), (Group) pair.get(1), oldBehav);
}
}
Aggregations