UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
SoftsSpring.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3
6
7namespace Chaos::Softs
8{
9
10namespace Spring
11{
12
13// Spring without damping
14template<typename SolverParticlesOrRange>
16 const TVec2<int32>& Constraint, const FSolverReal RestLength, FSolverReal& Lambda,
18{
19 const int32 Index1 = Constraint[0];
20 const int32 Index2 = Constraint[1];
21
22 const FSolverReal CombinedInvMass = Particles.InvM(Index2) + Particles.InvM(Index1);
23
24 const FSolverVec3& P1 = Particles.P(Index1);
25 const FSolverVec3& P2 = Particles.P(Index2);
26 FSolverVec3 Direction = P1 - P2;
27 const FSolverReal Distance = Direction.SafeNormalize();
28 const FSolverReal Offset = Distance - RestLength;
29
30 const FSolverReal AlphaInv = StiffnessValue * Dt * Dt;
31
32 const FSolverReal DLambda = (-AlphaInv * Offset - Lambda) / (AlphaInv * CombinedInvMass + (FSolverReal)1.);
33 const FSolverVec3 Delta = DLambda * Direction;
34 Lambda += DLambda;
35
36 return Delta;
37}
38
39// This is a following the original XPBD paper using a single lambda for stretch and damping.
40template<typename SolverParticlesOrRange>
42 const TVec2<int32>& Constraint, const FSolverReal RestLength, FSolverReal& Lambda,
44{
45 const int32 Index1 = Constraint[0];
46 const int32 Index2 = Constraint[1];
47
48 const FSolverReal CombinedInvMass = Particles.InvM(Index2) + Particles.InvM(Index1);
50
51 const FSolverReal Damping = DampingRatioValue * 2.f * FMath::Sqrt(StiffnessValue / CombinedInvMass) * (RestLength > UE_SMALL_NUMBER ? (FSolverReal)1. / RestLength : (FSolverReal)1.);
52
53 const FSolverVec3& P1 = Particles.P(Index1);
54 const FSolverVec3& P2 = Particles.P(Index2);
55 FSolverVec3 Direction = P1 - P2;
56 const FSolverReal Distance = Direction.SafeNormalize();
57 const FSolverReal Offset = Distance - RestLength;
58
59 const FSolverVec3& X1 = Particles.GetX(Index1);
60 const FSolverVec3& X2 = Particles.GetX(Index2);
61
62 const FSolverVec3 RelativeVelocityTimesDt = P1 - X1 - P2 + X2;
63
64 const FSolverReal AlphaInv = StiffnessValue * Dt * Dt;
65 const FSolverReal BetaDt = Damping * Dt;
66
67 const FSolverReal DLambda = (-AlphaInv * Offset - Lambda - BetaDt * FSolverVec3::DotProduct(Direction, RelativeVelocityTimesDt)) / ((AlphaInv + BetaDt) * CombinedInvMass + (FSolverReal)1.);
68 const FSolverVec3 Delta = DLambda * Direction;
69 Lambda += DLambda;
70
71 return Delta;
72}
73
74// Spring damping constraint (separate from spring stretching)
75template<typename SolverParticlesOrRange>
77 const TVec2<int32>& Constraint, const FSolverReal RestLength, FSolverReal& Lambda,
79{
80 const int32 Index1 = Constraint[0];
81 const int32 Index2 = Constraint[1];
82 const FSolverReal CombinedInvMass = Particles.InvM(Index2) + Particles.InvM(Index1);
84
85 const FSolverReal Damping = DampingRatioValue * 2.f * FMath::Sqrt(StiffnessValue / CombinedInvMass) * (RestLength > UE_SMALL_NUMBER ? (FSolverReal)1. / RestLength : (FSolverReal)1.);
86
87 const FSolverVec3& P1 = Particles.P(Index1);
88 const FSolverVec3& P2 = Particles.P(Index2);
89 FSolverVec3 Direction = (P1 - P2);
90 Direction.SafeNormalize();
91
92 const FSolverVec3& X1 = Particles.GetX(Index1);
93 const FSolverVec3& X2 = Particles.GetX(Index2);
94 const FSolverVec3 RelativeVelocityTimesDt = P1 - X1 - P2 + X2;
95 const FSolverReal BetaDt = Damping * Dt;
96 const FSolverReal DLambda = (-BetaDt * FSolverVec3::DotProduct(Direction, RelativeVelocityTimesDt) - Lambda) / (BetaDt * CombinedInvMass + (FSolverReal)1.);
97 const FSolverVec3 Delta = DLambda * Direction;
98 Lambda += DLambda;
99 return Delta;
100}
101
102// Spring without damping
103template<typename SolverParticlesOrRange>
105 const TVec3<int32>& Constraint, const FSolverReal Bary, const FSolverReal RestLength, FSolverReal& Lambda,
107{
108 const int32 Index1 = Constraint[0];
109 const int32 Index2 = Constraint[1];
110 const int32 Index3 = Constraint[2];
111
112 const FSolverReal PInvMass = Particles.InvM(Index3) * ((FSolverReal)1. - Bary) + Particles.InvM(Index2) * Bary;
113 const FSolverReal CombinedInvMass = PInvMass + Particles.InvM(Index1);
115
116 const FSolverVec3& P1 = Particles.P(Index1);
117 const FSolverVec3& P2 = Particles.P(Index2);
118 const FSolverVec3& P3 = Particles.P(Index3);
119 const FSolverVec3 P = (P2 - P3) * Bary + P3;
120 FSolverVec3 Direction = P1 - P;
121 const FSolverReal Distance = Direction.SafeNormalize();
122 const FSolverReal Offset = Distance - RestLength;
123
124 const FSolverReal AlphaInv = StiffnessValue * Dt * Dt;
125
126 const FSolverReal DLambda = (-AlphaInv * Offset - Lambda) / (AlphaInv * CombinedInvMass + (FSolverReal)1.);
127 const FSolverVec3 Delta = DLambda * Direction;
128 Lambda += DLambda;
129
130 return Delta;
131}
132
133// This is a following the original XPBD paper using a single lambda for stretch and damping.
134template<typename SolverParticlesOrRange>
136 const TVec3<int32>& Constraint, const FSolverReal Bary, const FSolverReal RestLength, FSolverReal& Lambda,
138{
139 const int32 Index1 = Constraint[0];
140 const int32 Index2 = Constraint[1];
141 const int32 Index3 = Constraint[2];
142
143 const FSolverReal PInvMass = Particles.InvM(Index3) * ((FSolverReal)1. - Bary) + Particles.InvM(Index2) * Bary;
144 const FSolverReal CombinedInvMass = PInvMass + Particles.InvM(Index1);
146
147 const FSolverReal Damping = DampingRatioValue * 2.f * FMath::Sqrt(StiffnessValue / CombinedInvMass) * (RestLength > UE_SMALL_NUMBER ? (FSolverReal)1. / RestLength : (FSolverReal)1.);
148
149 const FSolverVec3& P1 = Particles.P(Index1);
150 const FSolverVec3& P2 = Particles.P(Index2);
151 const FSolverVec3& P3 = Particles.P(Index3);
152 const FSolverVec3 P = (P2 - P3) * Bary + P3;
153 FSolverVec3 Direction = P1 - P;
154 const FSolverReal Distance = Direction.SafeNormalize();
155 const FSolverReal Offset = Distance - RestLength;
156
157 const FSolverVec3& X1 = Particles.GetX(Index1);
158 const FSolverVec3& X2 = Particles.GetX(Index2);
159 const FSolverVec3& X3 = Particles.GetX(Index3);
160 const FSolverVec3 X = (X2 - X3) * Bary + X3;
161
162 const FSolverVec3 RelativeVelocityTimesDt = P1 - X1 - P + X;
163
164 const FSolverReal AlphaInv = StiffnessValue * Dt * Dt;
165 const FSolverReal BetaDt = Damping * Dt;
166
167 const FSolverReal DLambda = (-AlphaInv * Offset - Lambda - BetaDt * FSolverVec3::DotProduct(Direction, RelativeVelocityTimesDt)) / ((AlphaInv + BetaDt) * CombinedInvMass + (FSolverReal)1.);
168 const FSolverVec3 Delta = DLambda * Direction;
169 Lambda += DLambda;
170
171 return Delta;
172}
173
174// Spring damping constraint (separate from spring stretching)
175template<typename SolverParticlesOrRange>
177 const TVec3<int32>& Constraint, const FSolverReal Bary, const FSolverReal RestLength, FSolverReal& Lambda,
179{
180 const int32 Index1 = Constraint[0];
181 const int32 Index2 = Constraint[1];
182 const int32 Index3 = Constraint[2];
183
184 const FSolverReal PInvMass = Particles.InvM(Index3) * ((FSolverReal)1. - Bary) + Particles.InvM(Index2) * Bary;
185 const FSolverReal CombinedInvMass = PInvMass + Particles.InvM(Index1);
187
188 const FSolverReal Damping = DampingRatioValue * 2.f * FMath::Sqrt(StiffnessValue / CombinedInvMass) * (RestLength > UE_SMALL_NUMBER ? (FSolverReal)1. / RestLength : (FSolverReal)1.);
189
190 const FSolverVec3& P1 = Particles.P(Index1);
191 const FSolverVec3& P2 = Particles.P(Index2);
192 const FSolverVec3& P3 = Particles.P(Index3);
193 const FSolverVec3 P = (P2 - P3) * Bary + P3;
194 FSolverVec3 Direction = P1 - P;
195 const FSolverReal Distance = Direction.SafeNormalize();
196 const FSolverReal Offset = Distance - RestLength;
197
198 const FSolverVec3& X1 = Particles.GetX(Index1);
199 const FSolverVec3& X2 = Particles.GetX(Index2);
200 const FSolverVec3& X3 = Particles.GetX(Index3);
201 const FSolverVec3 X = (X2 - X3) * Bary + X3;
202 const FSolverVec3 RelativeVelocityTimesDt = P1 - X1 - P + X;
203 const FSolverReal BetaDt = Damping * Dt;
204 const FSolverReal DLambda = (-BetaDt * FSolverVec3::DotProduct(Direction, RelativeVelocityTimesDt) - Lambda) / (BetaDt * CombinedInvMass + (FSolverReal)1.);
205 const FSolverVec3 Delta = DLambda * Direction;
206 Lambda += DLambda;
207
208 return Delta;
209}
210
211// Spring without damping
212template<typename SolverParticlesOrRange, int32 N>
214 const TVector<int32, N>& Constraint, const TVector<FSolverReal, N>& Weights, const FSolverReal RestLength, FSolverReal& Lambda,
216{
218 FSolverVec3 Direction(0.f);
219 for (int32 NIdx = 0; NIdx < N; ++NIdx)
220 {
221 const int32 Index = Constraint[NIdx];
222 CombinedInvMass += Particles.InvM(Index) * FMath::Abs(Weights[NIdx]);
223 Direction += Particles.P(Index) * Weights[NIdx];
224 }
225
226 const FSolverReal Distance = Direction.SafeNormalize();
227 const FSolverReal Offset = Distance - RestLength;
228
229 // Do we need a smoothstep?
231 const FSolverReal AlphaInv = StiffnessValue * Dt * Dt;
232
233 const FSolverReal DLambda = (-AlphaInv * Offset - Lambda) / (AlphaInv * CombinedInvMass + (FSolverReal)1.);
234 const FSolverVec3 Delta = DLambda * Direction;
235 Lambda += DLambda;
236
237 return Delta;
238}
239
240// Spring damping constraint (separate from spring stretching)
241template<typename SolverParticlesOrRange, int32 N>
243 const TVector<int32, N>& Constraint, const TVector<FSolverReal, N>& Weights, const FSolverReal RestLength, FSolverReal& Lambda,
245{
248 FSolverVec3 DeltaX(0.f);
249 for (int32 NIdx = 0; NIdx < N; ++NIdx)
250 {
251 const int32 Index = Constraint[NIdx];
252 CombinedInvMass += Particles.InvM(Index) * FMath::Abs(Weights[NIdx]);
253 DeltaPDirection += Particles.P(Index) * Weights[NIdx];
254 DeltaX += Particles.X(Index) * Weights[NIdx];
255 }
257
259
260 const FSolverReal Distance = DeltaPDirection.SafeNormalize();
261 const FSolverReal Offset = Distance - RestLength;
263 const FSolverReal Damping = DampingRatioValue * 2.f * FMath::Sqrt(StiffnessValue / CombinedInvMass) * (RestLength > UE_SMALL_NUMBER ? (FSolverReal)1. / RestLength : (FSolverReal)1.);
264
265 const FSolverReal BetaDt = Damping * Dt;
266 const FSolverReal DLambda = (-BetaDt * FSolverVec3::DotProduct(DeltaPDirection, RelativeVelocityTimesDt) - Lambda) / (BetaDt * CombinedInvMass + (FSolverReal)1.);
268 Lambda += DLambda;
269
270 return Delta;
271}
272
273inline void UpdateSpringLinearSystem(const FSolverParticlesRange& Particles, const FSolverReal Dt,
274 const TVec2<int32>& Constraint, const FSolverReal RestLength,
275 const FSolverReal StiffnessValue, const FSolverReal MinStiffness, const FSolverReal DampingRatioValue,
277{
278 const int32 Index1 = Constraint[0];
279 const int32 Index2 = Constraint[1];
280
281 if (StiffnessValue <= MinStiffness || (Particles.InvM(Index2) == (FSolverReal)0. && Particles.InvM(Index1) == (FSolverReal)0.))
282 {
283 return;
284 }
285
286 const FSolverVec3& P1 = Particles.P(Index1);
287 const FSolverVec3& P2 = Particles.P(Index2);
288 FSolverVec3 Direction = P1 - P2;
289 const FSolverReal Distance = Direction.SafeNormalize();
291 {
292 // We can't calculate a direction if distance is zero. Just skip
293 return;
294 }
295 const FSolverReal CombinedInvMass = Particles.InvM(Index2) + Particles.InvM(Index1);
296
297 const FSolverReal Damping = DampingRatioValue * 2.f * FMath::Sqrt(StiffnessValue / CombinedInvMass) * (RestLength > UE_SMALL_NUMBER ? (FSolverReal)1. / RestLength : (FSolverReal)1.);
298 const FSolverVec3 RelVel = Particles.V(Index1) - Particles.V(Index2);
299 const FSolverReal CDot = FSolverVec3::DotProduct(Direction, RelVel);
300
301 const FSolverReal Offset = Distance - RestLength; // C
302 // const FSolverVec3 GradC1 = Direction;
303 // const FSolverVec3 GradC2 = -GradC1;
304 const FSolverReal Scalar = -(StiffnessValue * Offset + Damping * CDot);
305 const FSolverVec3 Force1 = Scalar * Direction;
306 // const FSolverVec3 Force2 = -Force1
307
308 const FSolverMatrix33 DirDirT = FSolverMatrix33::OuterProduct(Direction, Direction); // = GradC1 GradC1^T
309 const FSolverMatrix33 Hess11 = (FSolverReal)1. / Distance * (FSolverMatrix33::Identity - DirDirT); // = Hess22
310 // Hess12 = Hess21 = -Hess11
311
312 // Df1Dx1 = -Stiffness * (DirDirT + Offset * Hess11) - Damping * CDot * Hess11
313 const FSolverReal ScalarModified = LinearSystem.RequiresSPDForceDerivatives() ? FMath::Min(Scalar, 0) : Scalar;
316 // Df2Dx2 = Df1Dx1
317 const FSolverMatrix33 Df1Dv1 = -Damping * DirDirT;
319 // Df2Dv2 = Df1Dv1
320
321 if (Particles.InvM(Index1) != (FSolverReal)0.)
322 {
323 LinearSystem.AddForce(Particles, Force1, Index1, Dt);
324 LinearSystem.AddSymmetricForceDerivative(Particles, &Df1Dx1, &Df1Dv1, Index1, Index1, Dt);
325 LinearSystem.AddSymmetricForceDerivative(Particles, &Df1Dx2, &Df1Dv2, Index1, Index2, Dt);
326 if (Particles.InvM(Index2) != (FSolverReal)0.)
327 {
328 LinearSystem.AddForce(Particles, -Force1, Index2, Dt);
329 LinearSystem.AddSymmetricForceDerivative(Particles, &Df1Dx1, &Df1Dv1, Index2, Index2, Dt);
330 }
331 }
332 else
333 {
334 check(Particles.InvM(Index2) != (FSolverReal)0.);
335 LinearSystem.AddForce(Particles, -Force1, Index2, Dt);
336 LinearSystem.AddSymmetricForceDerivative(Particles, &Df1Dx1, &Df1Dv1, Index2, Index2, Dt);
337 LinearSystem.AddSymmetricForceDerivative(Particles, &Df1Dx2, &Df1Dv2, Index2, Index1, Dt);
338 }
339}
340
342 const TVec3<int32>& Constraint, const FSolverReal Bary, const FSolverReal RestLength,
343 const FSolverReal StiffnessValue, const FSolverReal MinStiffness, const FSolverReal DampingRatioValue,
345{
346 const int32 Index1 = Constraint[0];
347 const int32 Index2 = Constraint[1];
348 const int32 Index3 = Constraint[2];
349
350 const FSolverReal PInvMass = Particles.InvM(Index3) * ((FSolverReal)1. - Bary) + Particles.InvM(Index2) * Bary;
351 if (StiffnessValue < MinStiffness || (Particles.InvM(Index2) == (FSolverReal)0. && PInvMass == (FSolverReal)0.))
352 {
353 return;
354 }
355
356 const FSolverVec3& P1 = Particles.P(Index1);
357 const FSolverVec3& P2 = Particles.P(Index2);
358 const FSolverVec3& P3 = Particles.P(Index3);
359 const FSolverVec3 P = Bary * P2 + ((FSolverReal)1. - Bary) * P3;
360 FSolverVec3 Direction = P1 - P;
361 const FSolverReal Distance = Direction.SafeNormalize();
363 {
364 // We can't calculate a direction if distance is zero. Just skip
365 return;
366 }
367 const FSolverReal CombinedInvMass = PInvMass + Particles.InvM(Index1);
368
369 const FSolverReal Damping = DampingRatioValue * 2.f * FMath::Sqrt(StiffnessValue / CombinedInvMass) * (RestLength > UE_SMALL_NUMBER ? (FSolverReal)1. / RestLength : (FSolverReal)1.);
370
371 const FSolverVec3& V1 = Particles.V(Index1);
372 const FSolverVec3& V2 = Particles.V(Index2);
373 const FSolverVec3& V3 = Particles.V(Index3);
374 const FSolverVec3 V = Bary * V2 + ((FSolverReal)1. - Bary) * V3;
375
376 const FSolverVec3 RelVel = V1 - V;
377 const FSolverReal CDot = FSolverVec3::DotProduct(Direction, RelVel);
378
379 const FSolverReal Offset = Distance - RestLength; // C
380 // const FSolverVec3 GradC1 = Direction;
381 // const FSolverVec3 GradC2 = - Bary * GradC1;
382 // const FSolverVec3 GradC3 = - (1 - Bary) * GradC1;
383 const FSolverReal Scalar = -(StiffnessValue * Offset + Damping * CDot);
384 const FSolverVec3 Force1 = Scalar * Direction;
385 // const FSolverVec3 Force2 = -Bary * Force1
386 // const FSolverVec3 Force3 = -(1 - Bary) * Force1
387
388 const FSolverMatrix33 DirDirT = FSolverMatrix33::OuterProduct(Direction, Direction); // = GradC1 GradC1^T
389 const FSolverMatrix33 Hess11 = (FSolverReal)1. / Distance * (FSolverMatrix33::Identity - DirDirT);
390
391 // Df1Dx1 = -Stiffness * (DirDirT + Offset * Hess11) - Damping * CDot * Hess11
392 const FSolverReal ScalarModified = LinearSystem.RequiresSPDForceDerivatives() ? FMath::Min(Scalar, 0) : Scalar;
394 const FSolverMatrix33 Df1Dv1 = -Damping * DirDirT;
395
396 // DfiDxj = Bi * Bj * Df1Dx1, where B1 = 1, B2 = -Bary, B3 = -(1-Bary)
397 // Same for DfiDvj
398 const FSolverReal B3(Bary - (FSolverReal)1.);
399
400 if (Particles.InvM(Index1) != (FSolverReal)0.)
401 {
402 LinearSystem.AddForce(Particles, Force1, Index1, Dt);
403 LinearSystem.AddSymmetricForceDerivative(Particles, &Df1Dx1, &Df1Dv1, Index1, Index1, Dt);
404 }
405 if (Particles.InvM(Index2) != (FSolverReal)0.)
406 {
407 const FSolverMatrix33 Df2Dx2 = (Bary * Bary) * Df1Dx1;
408 const FSolverMatrix33 Df2Dv2 = (Bary * Bary) * Df1Dv1;
409 LinearSystem.AddForce(Particles, -Bary * Force1, Index2, Dt);
410 LinearSystem.AddSymmetricForceDerivative(Particles, &Df2Dx2, &Df2Dv2, Index2, Index2, Dt);
411 }
412 if (Particles.InvM(Index3) != (FSolverReal)0.)
413 {
414 const FSolverMatrix33 Df3Dx3 = (B3 * B3) * Df1Dx1;
415 const FSolverMatrix33 Df3Dv3 = (B3 * B3) * Df1Dv1;
416 LinearSystem.AddForce(Particles, -B3 * Force1, Index3, Dt);
417 LinearSystem.AddSymmetricForceDerivative(Particles, &Df3Dx3, &Df3Dv3, Index3, Index3, Dt);
418 }
419 if (Particles.InvM(Index1) != (FSolverReal)0. || Particles.InvM(Index2) != (FSolverReal)0.)
420 {
421 const FSolverMatrix33 Df1Dx2 = -Bary * Df1Dx1;
422 const FSolverMatrix33 Df1Dv2 = -Bary * Df1Dv1;
423 LinearSystem.AddSymmetricForceDerivative(Particles, &Df1Dx2, &Df1Dv2, Index1, Index2, Dt);
424 }
425 if (Particles.InvM(Index1) != (FSolverReal)0. || Particles.InvM(Index3) != (FSolverReal)0.)
426 {
427 const FSolverMatrix33 Df1Dx3 = -B3 * Df1Dx1;
428 const FSolverMatrix33 Df1Dv3 = -B3 * Df1Dv1;
429 LinearSystem.AddSymmetricForceDerivative(Particles, &Df1Dx3, &Df1Dv3, Index1, Index3, Dt);
430 }
431}
432}
433}
#define check(expr)
Definition AssertionMacros.h:314
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define UE_SMALL_NUMBER
Definition UnrealMathUtility.h:130
uint32 Offset
Definition VulkanMemory.cpp:4033
Definition Matrix.h:21
Definition SoftsEvolutionLinearSystem.h:45
Definition SoftsSolverParticlesRange.h:12
const FSolverVec3 & P(const int32 Index) const
Definition SoftsSolverParticlesRange.h:30
const FSolverVec3 & V(const int32 Index) const
Definition SoftsSolverParticlesRange.h:44
FSolverReal InvM(const int32 Index) const
Definition SoftsSolverParticlesRange.h:56
Definition Vector.h:1000
FSolverVec3 GetXPBDEmbeddedSpringDampingDelta(const SolverParticlesOrRange &Particles, const FSolverReal Dt, const TVector< int32, N > &Constraint, const TVector< FSolverReal, N > &Weights, const FSolverReal RestLength, FSolverReal &Lambda, const FSolverReal ExtensionStiffnessValue, const FSolverReal CompressionStiffnessValue, const FSolverReal DampingRatioValue)
Definition SoftsSpring.h:242
FSolverVec3 GetXPBDSpringDampingDelta(const SolverParticlesOrRange &Particles, const FSolverReal Dt, const TVec2< int32 > &Constraint, const FSolverReal RestLength, FSolverReal &Lambda, const FSolverReal StiffnessValue, const FSolverReal DampingRatioValue)
Definition SoftsSpring.h:76
FSolverVec3 GetXPBDAxialSpringDeltaWithDamping(const SolverParticlesOrRange &Particles, const FSolverReal Dt, const TVec3< int32 > &Constraint, const FSolverReal Bary, const FSolverReal RestLength, FSolverReal &Lambda, const FSolverReal StiffnessValue, const FSolverReal DampingRatioValue)
Definition SoftsSpring.h:135
FSolverVec3 GetXPBDAxialSpringDampingDelta(const SolverParticlesOrRange &Particles, const FSolverReal Dt, const TVec3< int32 > &Constraint, const FSolverReal Bary, const FSolverReal RestLength, FSolverReal &Lambda, const FSolverReal StiffnessValue, const FSolverReal DampingRatioValue)
Definition SoftsSpring.h:176
FSolverVec3 GetXPBDSpringDelta(const SolverParticlesOrRange &Particles, const FSolverReal Dt, const TVec2< int32 > &Constraint, const FSolverReal RestLength, FSolverReal &Lambda, const FSolverReal StiffnessValue)
Definition SoftsSpring.h:15
void UpdateAxialSpringLinearSystem(const FSolverParticlesRange &Particles, const FSolverReal Dt, const TVec3< int32 > &Constraint, const FSolverReal Bary, const FSolverReal RestLength, const FSolverReal StiffnessValue, const FSolverReal MinStiffness, const FSolverReal DampingRatioValue, FEvolutionLinearSystem &LinearSystem)
Definition SoftsSpring.h:341
FSolverVec3 GetXPBDEmbeddedSpringDelta(const SolverParticlesOrRange &Particles, const FSolverReal Dt, const TVector< int32, N > &Constraint, const TVector< FSolverReal, N > &Weights, const FSolverReal RestLength, FSolverReal &Lambda, const FSolverReal ExtensionStiffnessValue, const FSolverReal CompressionStiffnessValue)
Definition SoftsSpring.h:213
void UpdateSpringLinearSystem(const FSolverParticlesRange &Particles, const FSolverReal Dt, const TVec2< int32 > &Constraint, const FSolverReal RestLength, const FSolverReal StiffnessValue, const FSolverReal MinStiffness, const FSolverReal DampingRatioValue, FEvolutionLinearSystem &LinearSystem)
Definition SoftsSpring.h:273
FSolverVec3 GetXPBDAxialSpringDelta(const SolverParticlesOrRange &Particles, const FSolverReal Dt, const TVec3< int32 > &Constraint, const FSolverReal Bary, const FSolverReal RestLength, FSolverReal &Lambda, const FSolverReal StiffnessValue)
Definition SoftsSpring.h:104
FSolverVec3 GetXPBDSpringDeltaWithDamping(const SolverParticlesOrRange &Particles, const FSolverReal Dt, const TVec2< int32 > &Constraint, const FSolverReal RestLength, FSolverReal &Lambda, const FSolverReal StiffnessValue, const FSolverReal DampingRatioValue)
Definition SoftsSpring.h:41
Definition CollectionEmbeddedSpringConstraintFacade.cpp:6
FRealSingle FSolverReal
Definition PBDSoftsEvolutionFwd.h:31
@ X
Definition SimulationModuleBase.h:152
U16 Index
Definition radfft.cpp:71