修改水
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#if (OBI_ONI_SUPPORTED)
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Obi
|
||||
{
|
||||
public class OniChainConstraintsBatchImpl : OniConstraintsBatchImpl, IChainConstraintsBatchImpl
|
||||
{
|
||||
public OniChainConstraintsBatchImpl(OniChainConstraintsImpl constraints) : base(constraints, Oni.ConstraintType.Chain)
|
||||
{
|
||||
}
|
||||
|
||||
public void SetChainConstraints(ObiNativeIntList particleIndices, ObiNativeVector2List restLengths, ObiNativeIntList firstIndex, ObiNativeIntList numIndices, int count)
|
||||
{
|
||||
Oni.SetChainConstraints(oniBatch, particleIndices.GetIntPtr(), restLengths.GetIntPtr(), firstIndex.GetIntPtr(), numIndices.GetIntPtr(), count);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 315f0420a391e43b3a3e255fce157f2a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,28 @@
|
||||
#if (OBI_ONI_SUPPORTED)
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Obi
|
||||
{
|
||||
public class OniChainConstraintsImpl : OniConstraintsImpl
|
||||
{
|
||||
|
||||
public OniChainConstraintsImpl(OniSolverImpl solver) : base(solver, Oni.ConstraintType.Chain)
|
||||
{
|
||||
}
|
||||
|
||||
public override IConstraintsBatchImpl CreateConstraintsBatch()
|
||||
{
|
||||
var batch = new OniChainConstraintsBatchImpl(this);
|
||||
Oni.AddBatch(((OniSolverImpl)solver).oniSolver, ((OniConstraintsBatchImpl)batch).oniBatch);
|
||||
return batch;
|
||||
}
|
||||
|
||||
public override void RemoveBatch(IConstraintsBatchImpl batch)
|
||||
{
|
||||
Oni.RemoveBatch(((OniSolverImpl)solver).oniSolver, ((OniConstraintsBatchImpl)batch).oniBatch);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5730de157a60b46e9b258ac099ff1980
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user