struct MAGES::MeshDeformations::SolveVolumeConstraintsJob

Overview

Solves volume constraints. More…

struct SolveVolumeConstraintsJob: public IJobParallelFor
{
    // fields

    float TimeStepSquared;
    NativeArray ParticlesEnabled;
    NativeArray ParticlesPredictedPosition;
    NativeArray ParticlesInverseMass;
    NativeArray VolumeConstraintsEnabled;
    NativeArray VolumeConstraintsBreakable;
    NativeArray VolumeConstraintsPhysicsMaterialIndex;
    NativeArray VolumeConstraintsParticleA;
    NativeArray VolumeConstraintsParticleB;
    NativeArray VolumeConstraintsParticleC;
    NativeArray VolumeConstraintsParticleD;
    NativeArray VolumeConstraintsRestVolume;
    NativeArray VolumeConstraintsSimulationMeshDescriptorIndex;
    NativeArray SimulationMeshDescriptors;
    NativeArray VolumeConstraintsEnabledStateHasChanged;
    NativeArray<PhysicsMaterial> PhysicsMaterials;
    NativeArray ParticleCorrections;
    NativeArray ParticleCorrectionsCount;
    NativeArray ParticleLocks;

    // methods

    void Execute(int volumeConstraintIndex);
};

Detailed Documentation

Solves volume constraints.

Fields

float TimeStepSquared

The simulation time step squared.

NativeArray ParticlesEnabled

The enabled particles.

NativeArray ParticlesPredictedPosition

THe predicted particle positions.

NativeArray ParticlesInverseMass

The inverse mass of the particles.

NativeArray VolumeConstraintsEnabled

The enabled volume constraints.

NativeArray VolumeConstraintsBreakable

The breakable volume constraints.

NativeArray VolumeConstraintsPhysicsMaterialIndex

The physics material index of the volume constraints.

NativeArray VolumeConstraintsParticleA

The volume constraints particle A index.

NativeArray VolumeConstraintsParticleB

The volume constraints particle B index.

NativeArray VolumeConstraintsParticleC

The volume constraints particle C index.

NativeArray VolumeConstraintsParticleD

The volume constraints particle D index.

NativeArray VolumeConstraintsRestVolume

The volume constraints volume at rest configuration.

NativeArray VolumeConstraintsSimulationMeshDescriptorIndex

The volume constraints simulation mesh descriptor index.

NativeArray SimulationMeshDescriptors

The simulation mesh descriptors.

NativeArray VolumeConstraintsEnabledStateHasChanged

The flags indicating if the volume constraints enabled state has changed.

NativeArray<PhysicsMaterial> PhysicsMaterials

The physics materials.

NativeArray ParticleCorrections

The particle corrections buffer.

NativeArray ParticleCorrectionsCount

The particle corrections count.

NativeArray ParticleLocks

The particle locks, for interlocked operations.