undo method
Takes the last step back, counts and all.
Implementation
bool undo() {
// Any array answers, because every step is in all of them — see [endStep].
if (_faceAlive.undoDepth == 0) return false;
_positions.undo();
_origin.undo();
_next.undo();
_twin.undo();
_halfEdgeFace.undo();
_faceHalfEdge.undo();
_outgoing.undo();
_vertexAlive.undo();
_faceAlive.undo();
for (final layer in _floatLayers) {
layer.undo();
}
for (final layer in _intLayers) {
layer.undo();
}
_redoSlots.addAll(<int>[_vertexSlots, _faceSlots, _halfEdgeSlots]);
_halfEdgeSlots = _undoSlots.removeLast();
_faceSlots = _undoSlots.removeLast();
_vertexSlots = _undoSlots.removeLast();
_recount();
return true;
}