예제 #1
0
 protected override void SwapConstraints(int sourceIndex, int destIndex)
 {
     firstTriangle.Swap(sourceIndex, destIndex);
     numTriangles.Swap(sourceIndex, destIndex);
     restVolumes.Swap(sourceIndex, destIndex);
     pressureStiffness.Swap(sourceIndex, destIndex);
 }
예제 #2
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);
 }
예제 #3
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);
 }
        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);
        }
 protected override void SwapConstraints(int sourceIndex, int destIndex)
 {
     firstParticle.Swap(sourceIndex, destIndex);
     numParticles.Swap(sourceIndex, destIndex);
     lengths.Swap(sourceIndex, destIndex);
 }
예제 #6
0
 protected override void SwapConstraints(int sourceIndex, int destIndex)
 {
     lastIndices.Swap(sourceIndex, destIndex);
     restVolumes.Swap(sourceIndex, destIndex);
     pressureStiffness.Swap(sourceIndex, destIndex);
 }