Exemple #1
0
 protected override void SwapConstraints(int sourceIndex, int destIndex)
 {
     particleIndices.Swap(sourceIndex, destIndex);
     pinBodies.Swap(sourceIndex, destIndex);
     colliderIndices.Swap(sourceIndex, destIndex);
     offsets.Swap(sourceIndex, destIndex);
     restDarbouxVectors.Swap(sourceIndex, destIndex);
     stiffnesses.Swap(sourceIndex * 2, destIndex * 2);
     stiffnesses.Swap(sourceIndex * 2 + 1, destIndex * 2 + 1);
 }
Exemple #2
0
 protected override void SwapConstraints(int sourceIndex, int destIndex)
 {
     particleIndices.Swap(sourceIndex, destIndex);
     skinPoints.Swap(sourceIndex, destIndex);
     skinNormals.Swap(sourceIndex, destIndex);
     skinRadiiBackstop.Swap(sourceIndex * 3, destIndex * 3);
     skinRadiiBackstop.Swap(sourceIndex * 3 + 1, destIndex * 3 + 1);
     skinRadiiBackstop.Swap(sourceIndex * 3 + 2, destIndex * 3 + 2);
     skinCompliance.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);
     maxLengthsScales.Swap(sourceIndex, destIndex);
     stiffnesses.Swap(sourceIndex, destIndex);
 }
 protected override void SwapConstraints(int sourceIndex, int destIndex)
 {
     firstTriangle.Swap(sourceIndex, destIndex);
     numTriangles.Swap(sourceIndex, destIndex);
     restVolumes.Swap(sourceIndex, destIndex);
     pressureStiffness.Swap(sourceIndex, destIndex);
 }
 protected override void SwapConstraints(int sourceIndex, int destIndex)
 {
     particleIndices.Swap(sourceIndex * 3, destIndex * 3);
     particleIndices.Swap(sourceIndex * 3 + 1, destIndex * 3 + 1);
     particleIndices.Swap(sourceIndex * 3 + 2, destIndex * 3 + 2);
     restBends.Swap(sourceIndex, destIndex);
     bendingStiffnesses.Swap(sourceIndex, destIndex);
 }
Exemple #6
0
 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);
        }
Exemple #8
0
 protected override void SwapConstraints(int sourceIndex, int destIndex)
 {
     lastIndices.Swap(sourceIndex, destIndex);
     restVolumes.Swap(sourceIndex, destIndex);
     pressureStiffness.Swap(sourceIndex, destIndex);
 }