修改水

This commit is contained in:
2026-01-01 22:00:33 +08:00
parent 040a222bd6
commit 9ceffccd39
1800 changed files with 103929 additions and 139495 deletions

View File

@@ -34,9 +34,9 @@ namespace Obi
[SerializeField] [HideInInspector] private ObiActor actor1 = null; /**< one of the actors used by the stitcher.*/
[SerializeField] [HideInInspector] private ObiActor actor2 = null; /**< the second actor used by the stitcher.*/
[HideInInspector] public ObiNativeIntList particleIndices;
[HideInInspector] public ObiNativeFloatList stiffnesses;
[HideInInspector] public ObiNativeFloatList lambdas;
[HideInInspector] public ObiNativeIntList particleIndices = new ObiNativeIntList();
[HideInInspector] public ObiNativeFloatList stiffnesses = new ObiNativeFloatList();
[HideInInspector] public ObiNativeFloatList lambdas = new ObiNativeFloatList();
//private IntPtr batch;
private IStitchConstraintsBatchImpl m_BatchImpl;
@@ -176,10 +176,6 @@ namespace Obi
inSolver = true;
particleIndices = new ObiNativeIntList();
stiffnesses = new ObiNativeFloatList();
lambdas = new ObiNativeFloatList();
// create a constraint batch (CreateStitchConstraints() in burst returns a singleton):
m_BatchImpl = solver.implementation.CreateConstraintsBatch(Oni.ConstraintType.Stitch) as IStitchConstraintsBatchImpl;
@@ -199,10 +195,6 @@ namespace Obi
// Oni.RemoveBatch(actor1.solver.OniSolver, batch);
if (inSolver && m_BatchImpl != null)
{
lambdas.Dispose();
particleIndices.Dispose();
stiffnesses.Dispose();
solver.implementation.DestroyConstraintsBatch(m_BatchImpl as IStitchConstraintsBatchImpl);
m_BatchImpl.Destroy();
m_BatchImpl = null;
@@ -235,6 +227,7 @@ namespace Obi
m_BatchImpl.SetStitchConstraints(particleIndices, stiffnesses, lambdas, stitches.Count);
}
}
}