public void SetBendTwistConstraints(ObiNativeIntList orientationIndices, ObiNativeQuaternionList restDarboux, ObiNativeVector3List stiffnesses, ObiNativeFloatList lambdas, int count) { this.orientationIndices = orientationIndices.AsNativeArray <int>(); this.restDarboux = restDarboux.AsNativeArray <quaternion>(); this.stiffnesses = stiffnesses.AsNativeArray <float3>(); this.lambdas = lambdas.AsNativeArray <float>(); }
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 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>(); }
public void SetStitchConstraints(ObiNativeIntList particleIndices, ObiNativeFloatList stiffnesses, ObiNativeFloatList lambdas, int count) { this.particleIndices = particleIndices.AsNativeArray <int>(); this.stiffnesses = stiffnesses.AsNativeArray <float>(); this.lambdas = lambdas.AsNativeArray <float>(); m_ConstraintCount = 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>(); }
public void SetSkinConstraints(ObiNativeIntList particleIndices, ObiNativeVector4List skinPoints, ObiNativeVector4List skinNormals, ObiNativeFloatList skinRadiiBackstop, ObiNativeFloatList skinCompliance, ObiNativeFloatList lambdas, int count) { this.particleIndices = particleIndices.AsNativeArray <int>(); this.skinPoints = skinPoints.AsNativeArray <float4>(); this.skinNormals = skinNormals.AsNativeArray <float4>(); this.skinRadiiBackstop = skinRadiiBackstop.AsNativeArray <float>(); this.skinCompliance = skinCompliance.AsNativeArray <float>(); this.lambdas = lambdas.AsNativeArray <float>(); }
public void SetPinConstraints(ObiNativeIntList particleIndices, ObiNativeIntList colliderIndices, ObiNativeVector4List offsets, ObiNativeQuaternionList restDarbouxVectors, ObiNativeFloatList stiffnesses, ObiNativeFloatList lambdas, int count) { this.particleIndices = particleIndices.AsNativeArray <int>(); this.colliderIndices = colliderIndices.AsNativeArray <int>(); this.offsets = offsets.AsNativeArray <float4>(); this.restDarbouxVectors = restDarbouxVectors.AsNativeArray <quaternion>(); this.stiffnesses = stiffnesses.AsNativeArray <float2>(); this.lambdas = lambdas.AsNativeArray <float>(); }
public void SetStretchShearConstraints(ObiNativeIntList particleIndices, ObiNativeIntList orientationIndices, ObiNativeFloatList restLengths, ObiNativeQuaternionList restOrientations, ObiNativeVector3List stiffnesses, ObiNativeFloatList lambdas, int count) { this.particleIndices = particleIndices.AsNativeArray <int>(); this.orientationIndices = orientationIndices.AsNativeArray <int>(); this.restLengths = restLengths.AsNativeArray <float>(); this.restOrientations = restOrientations.AsNativeArray <quaternion>(); this.stiffnesses = stiffnesses.AsNativeArray <float3>(); this.lambdas = lambdas.AsNativeArray <float>(); }
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 SetShapeMatchingConstraints(ObiNativeIntList particleIndices, ObiNativeIntList firstIndex, ObiNativeIntList numIndices, ObiNativeIntList explicitGroup, ObiNativeFloatList shapeMaterialParameters, ObiNativeVector4List restComs, ObiNativeVector4List coms, ObiNativeQuaternionList constraintOrientations, ObiNativeFloatList lambdas, int count) { this.particleIndices = particleIndices.AsNativeArray <int>(); this.firstIndex = firstIndex.AsNativeArray <int>(); this.numIndices = numIndices.AsNativeArray <int>(); this.explicitGroup = explicitGroup.AsNativeArray <int>(); this.shapeMaterialParameters = shapeMaterialParameters.AsNativeArray <float>(); this.restComs = restComs.AsNativeArray <float4>(); this.coms = coms.AsNativeArray <float4>(); this.constraintOrientations = constraintOrientations.AsNativeArray <quaternion>(); if (Aqq.IsCreated) { Aqq.Dispose(); } if (deformation.IsCreated) { deformation.Dispose(); } Aqq = new NativeArray <float4x4>(count, Allocator.Persistent); deformation = new NativeArray <float4x4>(count, Allocator.Persistent); for (int i = 0; i < count; ++i) { deformation[i] = float4x4.identity; } m_ConstraintCount = count; }
public void SetAerodynamicConstraints(ObiNativeIntList particleIndices, ObiNativeFloatList aerodynamicCoeffs, int count) { this.particleIndices = particleIndices.AsNativeArray <int>(); this.aerodynamicCoeffs = aerodynamicCoeffs.AsNativeArray <float>(); m_ConstraintCount = count; }