31 lines
946 B
C#
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 |