示例#1
0
 public void SetTetherConstraints(ObiNativeIntList particleIndices, ObiNativeVector2List maxLengthScale, ObiNativeFloatList stiffnesses, ObiNativeFloatList lambdas, int count)
 {
     this.particleIndices = particleIndices.AsNativeArray <int>();
     this.maxLengthScale  = maxLengthScale.AsNativeArray <float2>();
     this.stiffnesses     = stiffnesses.AsNativeArray <float>();
     this.lambdas         = lambdas.AsNativeArray <float>();
 }
 public void SetChainConstraints(ObiNativeIntList particleIndices, ObiNativeVector2List restLengths, ObiNativeIntList firstIndex, ObiNativeIntList numIndices, int count)
 {
     this.particleIndices = particleIndices.AsNativeArray <int>();
     this.firstIndex      = firstIndex.AsNativeArray <int>();
     this.numIndices      = numIndices.AsNativeArray <int>();
     this.restLengths     = restLengths.AsNativeArray <float2>();
 }
示例#3
0
 public ObiEdgeMeshContainer()
 {
     handles  = new Dictionary <EdgeCollider2D, ObiEdgeMeshHandle>();
     headers  = new ObiNativeEdgeMeshHeaderList();
     bihNodes = new ObiNativeBIHNodeList();
     edges    = new ObiNativeEdgeList();
     vertices = new ObiNativeVector2List();
 }
 public void SetVolumeConstraints(ObiNativeIntList triangles,
                                  ObiNativeIntList firstIndex,
                                  ObiNativeFloatList restVolumes,
                                  ObiNativeVector2List pressureStiffness,
                                  ObiNativeFloatList lambdas,
                                  int count)
 {
     Oni.SetVolumeConstraints(oniBatch, triangles.GetIntPtr(), firstIndex.GetIntPtr(), restVolumes.GetIntPtr(), pressureStiffness.GetIntPtr(), lambdas.GetIntPtr(), count);
 }
 public void SetVolumeConstraints(ObiNativeIntList triangles,
                                  ObiNativeIntList firstIndex,
                                  ObiNativeFloatList restVolumes,
                                  ObiNativeVector2List pressureStiffness,
                                  ObiNativeFloatList lambdas,
                                  int count)
 {
     this.particleIndices   = triangles.AsNativeArray <int>();
     this.firstIndex        = firstIndex.AsNativeArray <int>();
     this.restVolumes       = restVolumes.AsNativeArray <float>();
     this.pressureStiffness = pressureStiffness.AsNativeArray <float2>();
     this.lambdas           = lambdas.AsNativeArray <float>();
 }
 public void SetTetherConstraints(ObiNativeIntList particleIndices, ObiNativeVector2List maxLengthScale, ObiNativeFloatList stiffnesses, ObiNativeFloatList lambdas, int count)
 {
     Oni.SetTetherConstraints(oniBatch, particleIndices.GetIntPtr(), maxLengthScale.GetIntPtr(), stiffnesses.GetIntPtr(), lambdas.GetIntPtr(), count);
 }
 public void SetEdgeMeshData(ObiNativeEdgeMeshHeaderList headers, ObiNativeBIHNodeList nodes, ObiNativeEdgeList edges, ObiNativeVector2List vertices)
 {
     Oni.SetEdgeMeshData(headers.GetIntPtr(), nodes.GetIntPtr(), edges.GetIntPtr(), vertices.GetIntPtr());
 }
示例#8
0
 public void SetBendTwistConstraints(ObiNativeIntList orientationIndices, ObiNativeQuaternionList restOrientations, ObiNativeVector3List stiffnesses, ObiNativeVector2List plasticity, ObiNativeFloatList lambdas, int count)
 {
     Oni.SetBendTwistConstraints(oniBatch, orientationIndices.GetIntPtr(), restOrientations.GetIntPtr(), stiffnesses.GetIntPtr(), plasticity.GetIntPtr(), lambdas.GetIntPtr(), count);
 }
示例#9
0
 public void SetBendConstraints(ObiNativeIntList particleIndices, ObiNativeFloatList restBends, ObiNativeVector2List bendingStiffnesses, ObiNativeFloatList lambdas, int count)
 {
     this.particleIndices = particleIndices.AsNativeArray <int>();
     this.restBends       = restBends.AsNativeArray <float>();
     this.stiffnesses     = bendingStiffnesses.AsNativeArray <float2>();
     this.lambdas         = lambdas.AsNativeArray <float>();
     m_ConstraintCount    = count;
 }
示例#10
0
 public void SetEdgeMeshData(ObiNativeEdgeMeshHeaderList headers, ObiNativeBIHNodeList nodes, ObiNativeEdgeList edges, ObiNativeVector2List vertices)
 {
 }
示例#11
0
 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);
 }
示例#12
0
 public void SetBendConstraints(ObiNativeIntList particleIndices, ObiNativeFloatList restBends, ObiNativeVector2List bendingStiffnesses, ObiNativeFloatList lambdas, int count)
 {
     Oni.SetBendingConstraints(oniBatch, particleIndices.GetIntPtr(), restBends.GetIntPtr(), bendingStiffnesses.GetIntPtr(), lambdas.GetIntPtr(), count);
 }
示例#13
0
 public void SetBendTwistConstraints(ObiNativeIntList orientationIndices, ObiNativeQuaternionList restDarboux, ObiNativeVector3List stiffnesses, ObiNativeVector2List plasticity, ObiNativeFloatList lambdas, int count)
 {
     this.orientationIndices = orientationIndices.AsNativeArray <int>();
     this.restDarboux        = restDarboux.AsNativeArray <quaternion>();
     this.stiffnesses        = stiffnesses.AsNativeArray <float3>();
     this.plasticity         = plasticity.AsNativeArray <float2>();
     this.lambdas            = lambdas.AsNativeArray <float>();
     m_ConstraintCount       = count;
 }
示例#14
0
 public void SetDistanceConstraints(ObiNativeIntList particleIndices, ObiNativeFloatList restLengths, ObiNativeVector2List stiffnesses, ObiNativeFloatList lambdas, int count)
 {
     Oni.SetDistanceConstraints(oniBatch, particleIndices.GetIntPtr(), restLengths.GetIntPtr(), stiffnesses.GetIntPtr(), lambdas.GetIntPtr(), count);
 }
 public void SetDistanceConstraints(ObiNativeIntList particleIndices, ObiNativeFloatList restLengths, ObiNativeVector2List stiffnesses, ObiNativeFloatList lambdas, int count)
 {
     this.particleIndices = particleIndices.AsNativeArray <int>();
     this.restLengths     = restLengths.AsNativeArray <float>();
     this.stiffnesses     = stiffnesses.AsNativeArray <float2>();
     this.lambdas         = lambdas.AsNativeArray <float>();
 }