struct MAGES::MeshDeformations::CalculateParticlesContributionToCoMsJob¶
Overview¶
Calculates the contribution of each particle’s position to the center of mass of the simulation mesh. More…
struct CalculateParticlesContributionToCoMsJob: public IJobParallelFor
{
// fields
NativeArray ParticlesEnabled;
NativeArray ParticlesPredictedPosition;
NativeArray ParticlesInverseMass;
NativeArray ParticlesSimulationMeshDescriptorIndex;
NativeArray SimulationMeshContainsParticlesWithInfiniteMass;
NativeArray SimulationMeshLocks;
NativeArray SimulationMeshTotalMass;
NativeArray SimulationMeshCoM;
// methods
void Execute(int particleIndex);
};
Detailed Documentation¶
Calculates the contribution of each particle’s position to the center of mass of the simulation mesh.
Fields¶
NativeArrayParticlesEnabled
The enabled state of each particle.
NativeArrayParticlesPredictedPosition
The predicted position of each particle.
NativeArrayParticlesInverseMass
The inverse mass of each particle.
NativeArrayParticlesSimulationMeshDescriptorIndex
The index of the simulation mesh descriptor for each particle.
NativeArraySimulationMeshContainsParticlesWithInfiniteMass
Flag indicating if the simulation mesh contains any particles with infinite mass.
NativeArraySimulationMeshLocks
Locking array for Interlocked operations.
NativeArraySimulationMeshTotalMass
The total mass of each simulation mesh.
NativeArraySimulationMeshCoM
The center of mass of each simulation mesh.