Files
Fishing2/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ParticleCollision/BurstParticleFrictionConstraints.cs
2026-01-22 22:08:21 +08:00

31 lines
946 B
C#

#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS)
using System;
namespace Obi
{
public class BurstParticleFrictionConstraints : BurstConstraintsImpl<BurstParticleFrictionConstraintsBatch>
{
public BurstParticleFrictionConstraints(BurstSolverImpl solver) : base(solver, Oni.ConstraintType.ParticleFriction)
{
}
public override IConstraintsBatchImpl CreateConstraintsBatch()
{
var dataBatch = new BurstParticleFrictionConstraintsBatch(this);
batches.Add(dataBatch);
return dataBatch;
}
public override void RemoveBatch(IConstraintsBatchImpl batch)
{
batches.Remove(batch as BurstParticleFrictionConstraintsBatch);
batch.Destroy();
}
public override int GetConstraintCount()
{
return ((BurstSolverImpl)solver).abstraction.particleContacts.count;
}
}
}
#endif