UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
SolverBody.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3
4#include "Chaos/Core.h"
5#include "Math/Quat.h"
6
7
8// Set to 1 to enable extra NaN tests in the constraint solver
9// NOTE: These will cause slowness!
10#ifndef CHAOS_CONSTRAINTSOLVER_NAN_DIAGNOSTIC
11#define CHAOS_CONSTRAINTSOLVER_NAN_DIAGNOSTIC ((DO_CHECK && UE_BUILD_DEBUG) || ENABLE_NAN_DIAGNOSTIC)
12#endif
13
14// Set to 1 to force single precision in the constraint solver, even if the default numeric type is double
15#define CHAOS_CONSTRAINTSOLVER_LOWPRECISION 1
16
17// Add some NaN checking when CHAOS_CONSTRAINTSOLVER_NAN_DIAGNOSTIC is defined
18#if CHAOS_CONSTRAINTSOLVER_NAN_DIAGNOSTIC
19inline void ChaosSolverCheckNaN(const Chaos::FRealSingle& V) { ensure(!FMath::IsNaN(V)); }
21inline void ChaosSolverCheckNaN(const Chaos::TRotation3<Chaos::FRealSingle>& V) { ensure(!V.ContainsNaN()); }
22
23inline void ChaosSolverCheckNaN(const Chaos::FRealDouble& V) { ensure(!FMath::IsNaN(V)); }
25inline void ChaosSolverCheckNaN(const Chaos::TRotation3<Chaos::FRealDouble>& V) { ensure(!V.ContainsNaN()); }
26#else
27#define ChaosSolverCheckNaN(...)
28#endif
29
30
31namespace Chaos
32{
33 // Set the math types used by the constraint solvers when single precision is acceptable.
34 // NOTE: public APIs should still use FReal, FVec3 etc. whereas FSolverReal and associated
35 // types are for use internally where double precision is unnecessary and causes performance
36 // issues and/or memory bloat.
37#if CHAOS_CONSTRAINTSOLVER_LOWPRECISION
40#else
41 using FSolverReal = FReal;
43#endif
47
48 class FSolverBody;
50
51
52 // A pair of pointers to solver bodies
53 // @note Pointers are only valid for the Constraint Solving phase of the tick
55
77
79
80
99 {
100 public:
101 static constexpr FSolverReal ZeroMassThreshold() { return std::numeric_limits<FSolverReal>::min(); }
102
103
109 {
110 FSolverBody SolverBody;
111 SolverBody.State.Init();
112 return SolverBody;
113 }
114
119 {
120 return FSolverBody();
121 }
122
127
131 void Reset()
132 {
133 State.DP = FSolverVec3(0);
134 State.DQ = FSolverVec3(0);
135 State.CP = FSolverVec3(0);
136 State.CQ = FSolverVec3(0);
137 }
138
143 {
144 if (IsDynamic() && (Dt != FReal(0)))
145 {
146 const FSolverReal InvDt = FSolverReal(1) / FSolverReal(Dt);
147 SetV(State.V + FVec3((State.DP - State.CP) * InvDt));
148 SetW(State.W + FVec3((State.DQ - State.CQ) * InvDt));
149 }
150 }
151
155 //inline FReal InvM() const { return State.InvM; }
156 inline FSolverReal InvM() const { return State.InvM; }
157
161 inline void SetInvM(FReal InInvM) { State.InvM = FSolverReal(InInvM); }
162
166 inline const FSolverMatrix33& InvI() const { return State.InvI; }
167
171 inline void SetInvI(const FMatrix33& InInvI) { State.InvI = FSolverMatrix33(InInvI); }
172
176 inline const FSolverVec3& InvILocal() const { return State.InvILocal; }
177
181 inline void SetInvILocal(const FVec3& InInvILocal)
182 {
183 State.InvILocal = FSolverVec3(InInvILocal);
185 }
186
190 inline FRigidTransform3 CoMTransform() const { return FRigidTransform3(P(), Q()); }
191
195 inline const FVec3& X() const { return State.X; }
196 inline void SetX(const FVec3& InX) { State.X = InX; }
197
201 inline const FRotation3& R() const { return State.R; }
202 inline void SetR(const FRotation3& InR)
203 {
205 State.R = InR;
206 }
207
213 inline const FVec3& P() const { return State.P; }
214 inline void SetP(const FVec3& InP) { State.P = InP; }
215
221 inline const FRotation3& Q() const { return State.Q; }
222 inline void SetQ(const FRotation3& InQ)
223 {
225 State.Q = InQ;
226 }
227
231 inline const FSolverVec3& V() const { return State.V; }
232 inline void SetV(const FVec3& InV)
233 {
235 State.V = FSolverVec3(InV);
236 }
237
241 inline const FSolverVec3& W() const { return State.W; }
242 inline void SetW(const FVec3& InW)
243 {
245 State.W = FSolverVec3(InW);
246 }
247
248 inline const FVec3& CoM() const { return State.CoM; }
249 inline void SetCoM(const FVec3& InCoM) { State.CoM = InCoM; }
250
251 inline const FRotation3& RoM() const { return State.RoM; }
252 inline void SetRoM(const FRotation3& InRoM) { State.RoM = InRoM; }
253
257 inline const FSolverVec3& DP() const { return State.DP; }
258 inline void SetDP(const FSolverVec3& InDP) { State.DP = InDP; }
259
263 inline const FSolverVec3& DQ() const { return State.DQ; }
264 inline void SetDQ(const FSolverVec3& InDQ) { State.DQ = InDQ; }
265
270 inline const FSolverVec3& CP() const { return State.CP; }
271
276 inline const FSolverVec3& CQ() const { return State.CQ; }
277
282 inline FVec3 CorrectedP() const { return State.P + FVec3(State.DP); }
283
288 inline FRotation3 CorrectedQ() const { return (IsDynamic() && !State.DQ.IsZero()) ? FRotation3::IntegrateRotationWithAngularVelocity(State.Q, FVec3(State.DQ), FReal(1)) : State.Q; }
289
296 {
297 State.P = CorrectedP();
298 State.Q = CorrectedQ();
299 State.DP = FSolverVec3(0);
300 State.DQ = FSolverVec3(0);
301 State.CP = FSolverVec3(0);
302 State.CQ = FSolverVec3(0);
303 }
304
308 inline FVec3 ActorP() const { return P() - FVec3(ActorQ().RotateVector(CoM())); }
309
313 inline FRotation3 ActorQ() const { return Q() * RoM().Inverse(); }
314
319 inline FVec3 CorrectedActorP() const { return CorrectedP() - CorrectedActorQ().RotateVector(CoM()); }
320
325 inline FRotation3 CorrectedActorQ() const { return CorrectedQ() * RoM().Inverse(); }
326
330 inline int32 Level() const { return State.Level; }
331 inline void SetLevel(int32 InLevel) { State.Level = InLevel; }
332
337 inline bool IsDynamic() const { return (State.InvM > FSolverBody::ZeroMassThreshold()); }
338
342 inline void ApplyTransformDelta(const FSolverVec3& DP, const FSolverVec3& DR)
343 {
346 }
347
352 {
354 State.DP += DP;
355 }
356
361 {
363 State.DQ += DR;
364 }
365
371 {
373 State.CP += CP;
374 State.DP += CP;
375 }
376
382 {
384 State.CQ += CR;
385 State.DQ += CR;
386 }
387
396
401 {
403 State.V += DV;
404 }
405
410 {
412 SetW(State.W + DW);
413 }
414
420 {
421 State.Q.EnforceShortestArcWith(InQ);
422 }
423
428
429
430
432 {
433 // The position solver only uses DP,DQ
434 FPlatformMisc::PrefetchBlock(&State.DP, 8 * sizeof(float));
435 }
436
438 {
439 // The velocity solver only uses V,W
440 FPlatformMisc::PrefetchBlock(&State.V, 8 * sizeof(float));
441 }
442
443 private:
444
445 // The struct exists only so that we can use the variable names
446 // as accessor names without violation the variable naming convention
447 struct FState
448 {
449 FState()
450 {}
451
452 void Init()
453 {
454 DP = FSolverVec3(0);
455 DQ = FSolverVec3(0);
456 V = FSolverVec3(0);
457 W = FSolverVec3(0);
458 InvI = FSolverMatrix33(0);
459 RoM = FRotation3::FromIdentity();
460 R = FRotation3::FromIdentity();
461 Q = FRotation3::FromIdentity();
462 CoM = FVec3(0);
463 X = FVec3(0);
464 P = FVec3(0);
465 InvILocal = FSolverVec3(0);
466 InvM = 0;
467 CP = FSolverVec3(0);
468 CQ = FSolverVec3(0);
469 Level = 0;
470 }
471
472 // Net position delta applied by all constraints (constantly changing as we iterate over constraints)
473 alignas(16) FSolverVec3 DP;
474
475 // Net rotation delta applied by all constraints (constantly changing as we iterate over constraints)
476 alignas(16) FSolverVec3 DQ;
477
478 // World-space center of mass velocity
479 alignas(16) FSolverVec3 V;
480
481 // World-space center of mass angular velocity
482 alignas(16) FSolverVec3 W;
483
484 // World-space inverse inertia
485 // NOTE: Matrix and Rotation are alignas(16) so beware of padding
486 // @todo(chaos): do we need this, or should we force all systems to use the FConstraintSolverBody decorator?
487 FSolverMatrix33 InvI;
488
489 // Actor-space center of mass rotation
490 FRotation3 RoM;
491
492 // World-space rotation of mass at start of sub step
494
495 // Predicted world-space center of mass rotation (post-integration, pre-constraint-solve)
496 FRotation3 Q;
497
498 // Actor-space center of mass location
499 FVec3 CoM;
500
501 // World-space center of mass state at start of sub step
502 FVec3 X;
503
504 // Predicted world-space center of mass position (post-integration, pre-constraint-solve)
505 FVec3 P;
506
507
508
509 // Local-space inverse inertia (diagonal, so only 3 elements)
510 FSolverVec3 InvILocal;
511
512 // Inverse mass
513 FSolverReal InvM;
514
515 // Net position correction delta applied by all constraints (constantly changing as we iterate over constraints)
516 // Will translate the body without introducing linear velocity
517 FSolverVec3 CP;
518
519 // Net rotation correction delta applied by all constraints (constantly changing as we iterate over constraints)
520 // Will rotate the body without introducing angular velocity
521 FSolverVec3 CQ;
522
523 // Distance to a kinematic body (through the contact graph). Used by collision shock propagation
524 int32 Level;
525 };
526
527 FState State;
528 };
529
530
543 {
544 public:
546 : Body(nullptr)
547 {
548 }
549
551 : Body(&InBody)
552 {
553 }
554
558 inline bool IsValid() const { return Body != nullptr; }
559
563 inline void Reset() { Body = nullptr; }
564
568 void Init() { State.Init(); }
569
575 {
576 Body = &InSolverBody;
577 }
578
582 inline FSolverBody& SolverBody() { check(IsValid()); return *Body; }
583 inline const FSolverBody& SolverBody() const { check(IsValid()); return *Body; }
584
588 inline FSolverReal InvMScale() const { return State.InvMScale; }
589 inline void SetInvMScale(FReal InValue) { State.InvMScale = FSolverReal(InValue); }
590
594 inline FSolverReal InvIScale() const { return State.InvIScale; }
595 inline void SetInvIScale(FReal InValue) { State.InvIScale = FSolverReal(InValue); }
596
597
601 inline FSolverReal ShockPropagationScale() const { return State.ShockPropagationScale; }
602 inline void SetShockPropagationScale(FReal InValue) { State.ShockPropagationScale = FSolverReal(InValue); }
603
607 FSolverReal InvM() const { return (State.ShockPropagationScale * State.InvMScale) * Body->InvM(); }
608
612 FSolverMatrix33 InvI() const { return (State.ShockPropagationScale * State.InvIScale) * Body->InvI(); }
613
617 FSolverVec3 InvILocal() const { return (State.ShockPropagationScale * State.InvIScale) * Body->InvILocal(); }
618
622 inline bool IsDynamic() const { return (InvM() > FSolverBody::ZeroMassThreshold()); }
623
624 //
625 // From here all methods just forward to the FSolverBody
626 //
627
628 inline void SetImplicitVelocity(FReal Dt) { Body->SetImplicitVelocity(Dt); }
629 inline FRigidTransform3 CoMTransform() const { return Body->CoMTransform(); }
630 inline const FVec3& X() const { return Body->X(); }
631 inline const FRotation3& R() const { return Body->R(); }
632 inline const FVec3& P() const { return Body->P(); }
633 inline const FRotation3& Q() const { return Body->Q(); }
634 inline const FVec3 ActorP() const { return Body->ActorP(); }
635 inline const FRotation3 ActorQ() const { return Body->ActorQ(); }
636 inline const FVec3 CorrectedActorP() const { return Body->CorrectedActorP(); }
637 inline const FRotation3 CorrectedActorQ() const { return Body->CorrectedActorQ(); }
638 inline const FSolverVec3& V() const { return Body->V(); }
639 inline const FSolverVec3& W() const { return Body->W(); }
640 inline int32 Level() const { return Body->Level(); }
641 inline const FSolverVec3& DP() const { return Body->DP(); }
642 inline const FSolverVec3& DQ() const { return Body->DQ(); }
643 inline const FSolverVec3& CP() const { return Body->CP(); }
644 inline const FSolverVec3& CQ() const { return Body->CQ(); }
645 inline FVec3 CorrectedP() const { return Body->CorrectedP(); }
646 inline FRotation3 CorrectedQ() const { return Body->CorrectedQ(); }
647
648 inline void ApplyTransformDelta(const FSolverVec3& DP, const FSolverVec3& DR) { Body->ApplyTransformDelta(DP, DR); }
649 inline void ApplyPositionDelta(const FSolverVec3& DP) { Body->ApplyPositionDelta(DP); }
650 inline void ApplyRotationDelta(const FSolverVec3& DR) { Body->ApplyRotationDelta(DR); }
653 inline void ApplyVelocityDelta(const FSolverVec3& DV, const FSolverVec3& DW) { Body->ApplyVelocityDelta(DV, DW); }
658
659 private:
660 // Struct is only so that we can use the same var names as function names
661 struct FState
662 {
663 FState()
664 {
665 }
666
667 void Init()
668 {
669 InvMScale = FSolverReal(1);
670 InvIScale = FSolverReal(1);
671 ShockPropagationScale = FSolverReal(1);
672 }
673
674 FSolverReal InvMScale;
675 FSolverReal InvIScale;
676 FSolverReal ShockPropagationScale;
677 };
678
679 // The body we decorate
680 FSolverBody* Body;
681
682 // The body modifiers
683 FState State;
684 };
685}
#define check(expr)
Definition AssertionMacros.h:314
#define ensure( InExpression)
Definition AssertionMacros.h:464
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 X(Name, Desc)
Definition FormatStringSan.h:47
#define ChaosSolverCheckNaN(...)
Definition SolverBody.h:27
VectorRegister4Double VectorRegister4
Definition UnrealMathFPU.h:94
Definition SolverBody.h:543
void EnforceShortestRotationTo(const FRotation3 &InQ)
Definition SolverBody.h:656
void ApplyPositionCorrectionDelta(const FSolverVec3 &DP)
Definition SolverBody.h:651
void SetInvIScale(FReal InValue)
Definition SolverBody.h:595
FRigidTransform3 CoMTransform() const
Definition SolverBody.h:629
bool IsDynamic() const
Whether the body is dynamic (i.e., has a finite mass) after scaling is applied.
Definition SolverBody.h:622
void ApplyPositionDelta(const FSolverVec3 &DP)
Definition SolverBody.h:649
FSolverReal ShockPropagationScale() const
Shock propagation mass and inertia scaling (0 for infinite mass, 1 for no effect)
Definition SolverBody.h:601
bool IsValid() const
True if we have been set up to decorate a SolverBody.
Definition SolverBody.h:558
const FSolverVec3 & CQ() const
Definition SolverBody.h:644
void SetSolverBody(FSolverBody &InSolverBody)
Set the inner solver body (hold by reference)
Definition SolverBody.h:574
void ApplyAngularVelocityDelta(const FSolverVec3 &DW)
Definition SolverBody.h:655
const FSolverVec3 & DP() const
Definition SolverBody.h:641
void UpdateRotationDependentState()
Definition SolverBody.h:657
FSolverBody & SolverBody()
The decorated SolverBody.
Definition SolverBody.h:582
FSolverReal InvM() const
The net scaled inverse mass.
Definition SolverBody.h:607
FSolverReal InvMScale() const
A scale applied to inverse mass.
Definition SolverBody.h:588
void ApplyVelocityDelta(const FSolverVec3 &DV, const FSolverVec3 &DW)
Definition SolverBody.h:653
const FRotation3 CorrectedActorQ() const
Definition SolverBody.h:637
FRotation3 CorrectedQ() const
Definition SolverBody.h:646
void SetInvMScale(FReal InValue)
Definition SolverBody.h:589
void SetImplicitVelocity(FReal Dt)
Definition SolverBody.h:628
FConstraintSolverBody(FSolverBody &InBody)
Definition SolverBody.h:550
FVec3 CorrectedP() const
Definition SolverBody.h:645
const FSolverBody & SolverBody() const
Definition SolverBody.h:583
FConstraintSolverBody()
Definition SolverBody.h:545
int32 Level() const
Definition SolverBody.h:640
void SetShockPropagationScale(FReal InValue)
Definition SolverBody.h:602
const FRotation3 & R() const
Definition SolverBody.h:631
void Init()
Initialize all properties to safe values.
Definition SolverBody.h:568
const FVec3 ActorP() const
Definition SolverBody.h:634
FSolverMatrix33 InvI() const
The net scaled inverse inertia.
Definition SolverBody.h:612
const FSolverVec3 & DQ() const
Definition SolverBody.h:642
FSolverReal InvIScale() const
A scale applied to inverse inertia.
Definition SolverBody.h:594
void ApplyLinearVelocityDelta(const FSolverVec3 &DV)
Definition SolverBody.h:654
const FVec3 & X() const
Definition SolverBody.h:630
void ApplyRotationDelta(const FSolverVec3 &DR)
Definition SolverBody.h:650
const FSolverVec3 & V() const
Definition SolverBody.h:638
const FSolverVec3 & CP() const
Definition SolverBody.h:643
void ApplyRotationCorrectionDelta(const FSolverVec3 &DR)
Definition SolverBody.h:652
const FSolverVec3 & W() const
Definition SolverBody.h:639
void ApplyTransformDelta(const FSolverVec3 &DP, const FSolverVec3 &DR)
Definition SolverBody.h:648
const FRotation3 & Q() const
Definition SolverBody.h:633
void Reset()
Invalidate the solver body reference.
Definition SolverBody.h:563
FSolverVec3 InvILocal() const
The net scaled local space inverse inertia.
Definition SolverBody.h:617
const FRotation3 ActorQ() const
Definition SolverBody.h:635
const FVec3 & P() const
Definition SolverBody.h:632
const FVec3 CorrectedActorP() const
Definition SolverBody.h:636
Definition SolverBodyContainer.h:37
Definition SolverBody.h:99
void SetV(const FVec3 &InV)
Definition SolverBody.h:232
static constexpr FSolverReal ZeroMassThreshold()
Definition SolverBody.h:101
const FRotation3 & R() const
Pre-integration world-space center of mass rotation.
Definition SolverBody.h:201
FVec3 ActorP() const
Get the world-space Actor position.
Definition SolverBody.h:308
FSolverBody()
Definition SolverBody.h:126
FRotation3 ActorQ() const
Get the world-space Actor rotation.
Definition SolverBody.h:313
void SetP(const FVec3 &InP)
Definition SolverBody.h:214
const FVec3 & P() const
Predicted (post-integrate) world-space center of mass position.
Definition SolverBody.h:213
void SetLevel(int32 InLevel)
Definition SolverBody.h:331
void ApplyPositionCorrectionDelta(const FSolverVec3 &CP)
Apply a world-space position correction delta to the solver body center of mass This will translate t...
Definition SolverBody.h:370
const FSolverVec3 & InvILocal() const
Get the local-space inverse inertia (diagonal elements)
Definition SolverBody.h:176
void ApplyPositionDelta(const FSolverVec3 &DP)
Apply a world-space position delta to the solver body center of mass.
Definition SolverBody.h:351
const FSolverVec3 & V() const
World-space center of mass velocity.
Definition SolverBody.h:231
void ApplyVelocityDelta(const FSolverVec3 &DV, const FSolverVec3 &DW)
Apply a world-space velocity delta to the solver body.
Definition SolverBody.h:391
FRigidTransform3 CoMTransform() const
The current CoM transform.
Definition SolverBody.h:190
void ApplyAngularVelocityDelta(const FSolverVec3 &DW)
Apply an world-space angular velocity delta to the solver body.
Definition SolverBody.h:409
const FSolverMatrix33 & InvI() const
Get the world-space inverse inertia.
Definition SolverBody.h:166
const FVec3 & X() const
Pre-integration world-space center of mass position.
Definition SolverBody.h:195
FRotation3 CorrectedQ() const
World-space rotation after applying the net correction DQ()
Definition SolverBody.h:288
void SetImplicitVelocity(FReal Dt)
Calculate and set the velocity and angular velocity from the net transform delta.
Definition SolverBody.h:142
void ApplyRotationCorrectionDelta(const FSolverVec3 &CR)
Apply a world-space rotation correction delta to the solver body This will rotate the body without in...
Definition SolverBody.h:381
void PrefetchPositionSolverData() const
Definition SolverBody.h:431
const FVec3 & CoM() const
Definition SolverBody.h:248
FVec3 CorrectedActorP() const
Get the current world-space Actor position.
Definition SolverBody.h:319
void ApplyLinearVelocityDelta(const FSolverVec3 &DV)
Apply a world-space linear velocity delta to the solver body.
Definition SolverBody.h:400
void SetInvILocal(const FVec3 &InInvILocal)
Set the local-space inverse inertia (diagonal elements)
Definition SolverBody.h:181
void Reset()
Definition SolverBody.h:131
void ApplyCorrections()
Apply the accumulated position and rotation corrections to the predicted P and Q This is only used by...
Definition SolverBody.h:295
const FSolverVec3 & W() const
World-space center of mass angular velocity.
Definition SolverBody.h:241
void SetDP(const FSolverVec3 &InDP)
Definition SolverBody.h:258
void ApplyRotationDelta(const FSolverVec3 &DR)
Apply a world-space rotation delta to the solver body and update the inverse mass.
Definition SolverBody.h:360
void SetInvM(FReal InInvM)
Set the inverse mass.
Definition SolverBody.h:161
void SetX(const FVec3 &InX)
Definition SolverBody.h:196
void ApplyTransformDelta(const FSolverVec3 &DP, const FSolverVec3 &DR)
Apply a world-space position and rotation delta to the body center of mass, and update inverse mass.
Definition SolverBody.h:342
void SetDQ(const FSolverVec3 &InDQ)
Definition SolverBody.h:264
const FRotation3 & Q() const
Predicted (post-integrate) world-space center of mass rotation.
Definition SolverBody.h:221
const FSolverVec3 & CQ() const
Net world-space rotation correction applied by the constraints (axis-angle vector equivalent to angul...
Definition SolverBody.h:276
const FRotation3 & RoM() const
Definition SolverBody.h:251
void SetR(const FRotation3 &InR)
Definition SolverBody.h:202
void UpdateRotationDependentState()
Update cached state that depends on rotation (i.e., world space inertia)
Definition SolverBody.cpp:10
FRotation3 CorrectedActorQ() const
Get the current world-space Actor rotation.
Definition SolverBody.h:325
FSolverReal InvM() const
Get the inverse mass.
Definition SolverBody.h:156
static FSolverBody MakeUninitialized()
Definition SolverBody.h:118
void SetQ(const FRotation3 &InQ)
Definition SolverBody.h:222
void SetRoM(const FRotation3 &InRoM)
Definition SolverBody.h:252
static FSolverBody MakeInitialized()
Definition SolverBody.h:108
void EnforceShortestRotationTo(const FRotation3 &InQ)
Update the rotation to be in the same hemisphere as the provided quaternion. This is used by joints w...
Definition SolverBody.h:419
const FSolverVec3 & DP() const
Net world-space position displacement applied by the constraints.
Definition SolverBody.h:257
void SetInvI(const FMatrix33 &InInvI)
Set the world-space inverse inertia.
Definition SolverBody.h:171
FVec3 CorrectedP() const
World-space position after applying the net correction DP()
Definition SolverBody.h:282
const FSolverVec3 & DQ() const
Net world-space rotation displacement applied by the constraints (axis-angle vector equivalent to ang...
Definition SolverBody.h:263
void PrefetchVelocitySolverData() const
Definition SolverBody.h:437
int32 Level() const
Contact graph level. This is used in shock propagation to determine which of two bodies should have i...
Definition SolverBody.h:330
void SetCoM(const FVec3 &InCoM)
Definition SolverBody.h:249
const FSolverVec3 & CP() const
Net world-space position correction applied by the constraints.
Definition SolverBody.h:270
void SetW(const FVec3 &InW)
Definition SolverBody.h:242
bool IsDynamic() const
Whether the body has a finite mass.
Definition SolverBody.h:337
Definition Matrix.h:21
Definition Rotation.h:41
Definition Vector.h:1000
FORCEINLINE bool ContainsNaN() const
Definition Vector.h:1101
Definition Vector.h:41
Definition SkeletalMeshComponent.h:307
TRigidTransform< FReal, 3 > FRigidTransform3
Definition Core.h:22
TMatrix33< FSolverReal > FSolverMatrix33
Definition SolverBody.h:46
FRealDouble FReal
Definition Real.h:22
TRotation< FReal, 3 > FRotation3
Definition Core.h:19
TVec3< FSolverReal > FSolverVec3
Definition SolverBody.h:44
void SolverQuaternionNormalizeApprox(FRotation3 &InOutQ)
An approximate quaternion normalize for use in the solver.
Definition SolverBody.cpp:18
FRealSingle FSolverReal
Definition SolverBody.h:38
float FRealSingle
Definition Real.h:14
double FRealDouble
Definition Real.h:13
TVector< FReal, 3 > FVec3
Definition Core.h:17
FRotation3 SolverQuaternionApplyAngularDeltaApprox(const FRotation3 &InQ0, const FVec3 &InDR)
Definition SolverBody.cpp:69
ECompressionLevel Level
Definition OodleDataCompression.cpp:70
int32 P[512]
Definition FieldSystemNoiseAlgo.cpp:11
static FORCEINLINE void PrefetchBlock(const void *Ptr)
Definition GenericPlatformMisc.h:1467
Definition UnrealMathFPU.h:20