public void AddConstraint(int index, float area, float drag, float lift) { RegisterConstraint(); particleIndices.Add(index); aerodynamicCoeffs.Add(area); aerodynamicCoeffs.Add(drag); aerodynamicCoeffs.Add(lift); }
public void AddConstraint(Vector2Int indices, float restLength) { RegisterConstraint(); particleIndices.Add(indices[0]); particleIndices.Add(indices[1]); restLengths.Add(restLength); stiffnesses.Add(Vector2.zero); }
public void AddConstraint(int index, Vector4 point, Vector4 normal, float radius, float collisionRadius, float backstop, float stiffness) { RegisterConstraint(); particleIndices.Add(index); skinPoints.Add(point); skinNormals.Add(normal); skinRadiiBackstop.Add(radius); skinRadiiBackstop.Add(collisionRadius); skinRadiiBackstop.Add(backstop); skinCompliance.Add(stiffness); }
public void AddConstraint(int index, ObiColliderBase body, Vector3 offset, Quaternion restDarboux) { RegisterConstraint(); particleIndices.Add(index); pinBodies.Add(body != null ? body.OniCollider : IntPtr.Zero); offsets.Add(offset); restDarbouxVectors.Add(restDarboux); stiffnesses.Add(0); stiffnesses.Add(0); breakThresholds.Add(float.PositiveInfinity); }
public void AddConstraint(int solverIndex, ObiColliderBase body, Vector3 offset, Quaternion restDarboux, float linearCompliance, float rotationalCompliance, float breakThreshold) { RegisterConstraint(); particleIndices.Add(solverIndex); pinBodies.Add(body != null ? body.Handle : new ObiColliderHandle()); colliderIndices.Add(body != null ? body.Handle.index : -1); offsets.Add(offset); restDarbouxVectors.Add(restDarboux); stiffnesses.Add(linearCompliance); stiffnesses.Add(rotationalCompliance); breakThresholds.Add(breakThreshold); }
public void AddConstraint(int[] triangles, float restVolume) { RegisterConstraint(); firstTriangle.Add((int)particleIndices.count / 3); particleIndices.AddRange(triangles); restVolumes.Add(restVolume); pressureStiffness.Add(new Vector2(1, 0)); }
public void AddConstraint(Vector2Int indices, float maxLength, float scale) { RegisterConstraint(); particleIndices.Add(indices[0]); particleIndices.Add(indices[1]); maxLengthsScales.Add(new Vector2(maxLength, scale)); stiffnesses.Add(0); }
public void AddConstraint(Vector3Int indices, float restBend) { RegisterConstraint(); particleIndices.Add(indices[0]); particleIndices.Add(indices[1]); particleIndices.Add(indices[2]); restBends.Add(restBend); bendingStiffnesses.Add(Vector2.zero); }
public void AddConstraint(Vector2Int indices, int orientationIndex, float restLength, Quaternion restOrientation) { RegisterConstraint(); particleIndices.Add(indices[0]); particleIndices.Add(indices[1]); orientationIndices.Add(orientationIndex); restLengths.Add(restLength); restOrientations.Add(restOrientation); stiffnesses.Add(Vector3.zero); }