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.
NativeArrayParticlesEnabled
The enabled state of the particles.
NativeArrayParticlesBreakable
The breakable state of the particles.
NativeArrayParticlesPredictedPosition
The predicted positions of the particles.
NativeArrayParticlesInverseMass
The inverse mass of the particles.
NativeArrayParticlesPhase
The phase of the particles.
NativeArrayParticlesPhysicsMaterialIndex
The index of the physics material for each particle.
NativeArrayParticlesSimulationMeshDescriptorIndex
THe index of the simulation mesh descriptor for each particle.
NativeArray<PhysicsMaterial> PhysicsMaterials
The physics materials.
NativeArraySimulationMeshDescriptors
The simulation mesh descriptors.
NativeArrayParticlesEnabledStateHasChanged
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.
NativeArrayParticleCorrections
The corrections for the particles.
NativeArrayParticleCorrectionsCount
The number of corrections for each particle.
NativeArrayParticleLocks
The locking array for interlocked operations.