struct MAGES::MeshDeformations::SolveCollisionConstraintsJob

Overview

Solves the collision constraints. More…

struct SolveCollisionConstraintsJob: public IJobParallelForDefer
{
    // fields

    float ParticleRadius;
    float TimeStepSquared;
    NativeArray ParticlesEnabled;
    NativeArray ParticlesBreakable;
    NativeArray ParticlesPredictedPosition;
    NativeArray ParticlesInverseMass;
    NativeArray ParticlesPhase;
    NativeArray ParticlesPhysicsMaterialIndex;
    NativeArray ParticlesSimulationMeshDescriptorIndex;
    NativeArray<PhysicsMaterial> PhysicsMaterials;
    NativeArray SimulationMeshDescriptors;
    NativeArray ParticlesEnabledStateHasChanged;
    NativeArray<ContactPair> ContactPairs;
    NativeArray ParticleCorrections;
    NativeArray ParticleCorrectionsCount;
    NativeArray ParticleLocks;

    // methods

    void Execute(int contactIndex);
};

Detailed Documentation

Solves the collision constraints.

Fields

float ParticleRadius

The radius of the particles.

float TimeStepSquared

The simulation time step squared.

NativeArray ParticlesEnabled

The enabled state of the particles.

NativeArray ParticlesBreakable

The breakable state of the particles.

NativeArray ParticlesPredictedPosition

The predicted positions of the particles.

NativeArray ParticlesInverseMass

The inverse mass of the particles.

NativeArray ParticlesPhase

The phase of the particles.

NativeArray ParticlesPhysicsMaterialIndex

The index of the physics material for each particle.

NativeArray ParticlesSimulationMeshDescriptorIndex

THe index of the simulation mesh descriptor for each particle.

NativeArray<PhysicsMaterial> PhysicsMaterials

The physics materials.

NativeArray SimulationMeshDescriptors

The simulation mesh descriptors.

NativeArray ParticlesEnabledStateHasChanged

The flag to indicate if the enabled state of the particles of a simulation mesh has changed.

NativeArray<ContactPair> ContactPairs

The contact pairs to resolve.

NativeArray ParticleCorrections

The corrections for the particles.

NativeArray ParticleCorrectionsCount

The number of corrections for each particle.

NativeArray ParticleLocks

The locking array for interlocked operations.