![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <PhysicsProxy.h>
Inheritance diagram for TPhysicsProxy< Concrete, ConcreteData, TProxyTimeStamp >:Public Types | |
| using | FParticleType = Concrete |
| using | FParticlesType = Chaos::FPBDRigidParticles |
| using | FIntArray = Chaos::TArrayCollectionArray< int32 > |
Static Public Member Functions | |
| static constexpr EPhysicsProxyType | ConcreteType () |
Static Public Member Functions inherited from IPhysicsProxyBase | |
| static float | GetRenderInterpErrorCorrectionDuration () |
| static float | GetRenderInterpMaximumErrorCorrectionBeforeSnapping () |
| static float | GetRenderInterpErrorVelocitySmoothingDuration () |
| static bool | GetRenderInterpDebugDraw () |
| static float | GetRenderInterpErrorDirectionalDecayMultiplier () |
Additional Inherited Members | |
Protected Member Functions inherited from IPhysicsProxyBase | |
| virtual CHAOS_API | ~IPhysicsProxyBase () |
| template<typename TProxyTimeStamp > | |
| FORCEINLINE_DEBUGGABLE TProxyTimeStamp & | GetSyncTimestampAs () |
| CHAOS_API int32 | GetSolverSyncTimestamp_External () const |
Protected Attributes inherited from IPhysicsProxyBase | |
| Chaos::FPhysicsSolverBase * | Solver |
| UObject * | Owner |
| EPhysicsProxyType | Type |
| int32 | InitializedOnStep = INDEX_NONE |
| int32 | IgnoreDataOnStep_Internal = INDEX_NONE |
Base object interface for solver objects. Defines the expected API for objects uses CRTP for static dispatch, entire API considered "pure-virtual" and must be* defined. Forgetting to implement any of the interface functions will give errors regarding recursion on all control paths for TPhysicsProxy<T> where T will be the type that has not correctly implemented the API.
PersistentTask uses IPhysicsProxyBase, so when implementing a new specialized type it is necessary to include its header file in PersistentTask.cpp allowing the linker to properly resolve the new type.
May not be necessary overall once the engine has solidified - we can just use the final concrete objects but this gives us almost the same flexibility as the old callbacks while solving most of the drawbacks (virtual dispatch, cross-object interaction)
BG TODO - rename the callbacks functions, document for the base solver object
| using TPhysicsProxy< Concrete, ConcreteData, TProxyTimeStamp >::FIntArray = Chaos::TArrayCollectionArray<int32> |
| using TPhysicsProxy< Concrete, ConcreteData, TProxyTimeStamp >::FParticlesType = Chaos::FPBDRigidParticles |
| using TPhysicsProxy< Concrete, ConcreteData, TProxyTimeStamp >::FParticleType = Concrete |
|
inline |
|
inlineexplicit |
|
inlinevirtual |
Virtual destructor for derived objects, ideally no other virtuals should exist in this chain
|
inline |
|
inline |
The Particle Binding creates a connection between the particles in the simulation and the solver objects dataset.
|
inline |
CONTEXT: GAMETHREAD Returns a new unmanaged allocation of the data saved on the handle, otherwise nullptr CONTEXT: GAMETHREAD -> to -> PHYSICSTHREAD Called on the game thread when the solver is about to advance forward. This callback should Enqueue commands on the PhysicsThread to update the state of the solver CONTEXT: GAMETHREAD Called on game thread after NewData has been called to buffer the particle data for physics. The purpose of this method is to clear data, such as external force and torque, which have been accumulated over a game tick. Buffering these values once means they'll be accounted for in physics. If they are not cleared, then they may "overaccumulate".
|
inlinestaticconstexpr |
Returns the concrete type of the derived class
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
The following functions are to be implemented by all solver objects as we're using CRTP / F-Bound to statically dispatch the calls. Any common functions should be added here and to the derived solver objects
|
inline |
CONTEXT: PHYSICSTHREAD Called on the physics thread when the engine is shutting down the proxy and we need to remove it from any active simulations. Proxies are expected to entirely clean up their simulation state within this method. This is run in the task command step by the scene so the simulation will currently be idle
|
inline |
|
inline |
CONTEXT: GAMETHREAD Called during the gamethread sync after the proxy has been removed from its solver intended for final handoff of any data the proxy has that the gamethread may be interested in
|
inline |