protected override void SwapConstraints(int sourceIndex, int destIndex) { particleIndices.Swap(sourceIndex * 2, destIndex * 2); particleIndices.Swap(sourceIndex * 2 + 1, destIndex * 2 + 1); restDarbouxVectors.Swap(sourceIndex, destIndex); stiffnesses.Swap(sourceIndex, destIndex); }
protected override void SwapConstraints(int sourceIndex, int destIndex) { particleIndices.Swap(sourceIndex * 2, destIndex * 2); particleIndices.Swap(sourceIndex * 2 + 1, destIndex * 2 + 1); orientationIndices.Swap(sourceIndex, destIndex); restLengths.Swap(sourceIndex, destIndex); restOrientations.Swap(sourceIndex, destIndex); stiffnesses.Swap(sourceIndex, destIndex); }
protected override void SwapConstraints(int sourceIndex, int destIndex) { firstIndex.Swap(sourceIndex, destIndex); numIndices.Swap(sourceIndex, destIndex); explicitGroup.Swap(sourceIndex, destIndex); for (int i = 0; i < 5; ++i) { materialParameters.Swap(sourceIndex * 5 + i, destIndex * 5 + i); } restComs.Swap(sourceIndex, destIndex); coms.Swap(sourceIndex, destIndex); orientations.Swap(sourceIndex, destIndex); }