struct MAGES::MeshDeformations::ApplyContactFrictionJob

Overview

Applies contact friction to the particles. More…

struct ApplyContactFrictionJob: public IJobParallelForDefer
{
    // fields

    float ParticleRadius;
    NativeArray<ContactPair> ContactPairs;
    NativeArray SimulationMeshDescriptors;
    NativeArray<PhysicsMaterial> PhysicsMaterials;
    NativeArray ParticlesSimulationMeshDescriptorIndex;
    NativeArray ParticlesPhysicsMaterialIndex;
    NativeArray ParticlesEnabled;
    NativeArray ParticlesPredictedPositionBeforeCollisions;
    NativeArray ParticlesPredictedPositionAfterCollisions;
    NativeArray ParticlesPhase;
    NativeArray ParticlesInverseMass;
    NativeArray ParticleCorrections;
    NativeArray ParticleCorrectionsCount;
    NativeArray ParticleLocks;

    // methods

    void Execute(int contactIndex);
};

Detailed Documentation

Applies contact friction to the particles.

Fields

float ParticleRadius

The particle radius.

NativeArray<ContactPair> ContactPairs

The contact pairs to resolve.

NativeArray SimulationMeshDescriptors

The simulation mesh descriptors.

NativeArray<PhysicsMaterial> PhysicsMaterials

The physics materials.

NativeArray ParticlesSimulationMeshDescriptorIndex

THe index of the simulation mesh descriptor for each particle.

NativeArray ParticlesPhysicsMaterialIndex

The index of the physics material for each particle.

NativeArray ParticlesEnabled

The enabled state of the particles.

NativeArray ParticlesPredictedPositionBeforeCollisions

The predicted position of the particles before contact solving.

NativeArray ParticlesPredictedPositionAfterCollisions

The predicted position of the particles after contact solving.

NativeArray ParticlesPhase

The phase of the particles.

NativeArray ParticlesInverseMass

The inverse mass of the particles.

NativeArray ParticleCorrections

The corrections for the particles.

NativeArray ParticleCorrectionsCount

The number of corrections for each particle.

NativeArray ParticleLocks

The locking array for interlocked operations.