saveOriginalState method

dynamic saveOriginalState()

Implementation

saveOriginalState() {
  var binding = this.binding;

  var buffer = this.buffer, stride = valueSize, originalValueOffset = stride * _origIndex;

  binding.getValue(buffer, originalValueOffset);

  // accu[0..1] := orig -- initially detect changes against the original
  for (var i = stride, e = originalValueOffset; i != e; ++i) {
    buffer[i] = buffer[originalValueOffset + (i % stride)];
  }

  // Add to identity for additive
  _setIdentity();

  cumulativeWeight = 0;
  cumulativeWeightAdditive = 0;
}