#todo: -proper suspension setup for resting position - decide on parameters i.e. 更多...
类 | |
| struct | ClusterId |
| Used within the clustering system to describe the clustering hierarchy. 更多... | |
| class | ConstraintSettings |
| Constraint settings all for generic defaults and scalars to the constraint parameters so that converting between existing (pre v4.26) simulation parameters and Chaos can produce similar simulation results. 更多... | |
| class | FAsyncCollisionReceiver |
| Consumes lists of contacts generated by an FCollisionDetector (which may be on a separate thread) and then adds the contacts to the CollisionConstraints in a thread-safe way. 更多... | |
| class | FBroadPhase |
| Base class for collision detection BroadPhases. 更多... | |
| class | FChaosMarshallingManager |
| Manages data that gets marshaled from GT to PT using a timestamp 更多... | |
| class | FCollisionContext |
| Data passed down into the collision detection functions. 更多... | |
| class | FColoringGraph |
| A graph used by the constraints system. 更多... | |
| struct | FConstMaterialHandle |
| Helper wrapper to encapsulate the access through the material manager Handles returned from the material manager are only designed to be used (resolved) on the game thread by the physics interface. 更多... | |
| struct | FConstMaterialMaskHandle |
| Helper wrapper to encapsulate the access through the material manager Handles returned from the material manager are only designed to be used (resolved) on the game thread by the physics interface. 更多... | |
| class | FConstraintHandle |
| Base class for constraint handles. 更多... | |
| class | FConstraintRule |
| Constraint Rules bind constraint collections to the evolution and provide their update algorithm. 更多... | |
| class | FDebugSolverTasks |
| List of solver tasks stub for non debug builds. 更多... | |
| class | FDebugSubstep |
| Debug substep stub for non debug builds. 更多... | |
| class | FDenseMatrixSolver |
| Methods to solves sets of Linear equations stored as AX = B where A is an NxN matrix, and X.B are Nx1 column vectors. 更多... | |
| class | FGuardedTripleBuffer |
| Triple buffer based on a single atomic variable, that guards against the consumer thread using old values. 更多... | |
| class | FJointSolverConstraintRowData |
| A single sub-constraint in a Joint (e.g., Twist, Swing, etc.) 更多... | |
| class | FJointSolverConstraintRowState |
| Transient state for a single sub-constraint in a joint 更多... | |
| class | FJointSolverConstraints |
| All the constraints in a joint 更多... | |
| class | FJointSolverGaussSeidel |
| Calculate new positions and rotations for a pair of bodies connected by a joint. 更多... | |
| class | FJointSolverJointState |
| Body and joint state required during a joint's solve (used by all sub-constraints in the joint) 更多... | |
| class | FMassMatrix |
| A block-diagonal matrix specifically for use with Mass/Inertia (or more usually inverse mass and inertia) and TDenseMatrix math used by the constraint solvers. 更多... | |
| struct | FMaterialHandle |
| Helper wrapper to encapsulate the access through the material manager Handles returned from the material manager are only designed to be used (resolved) on the game thread by the physics interface. 更多... | |
| struct | FMaterialMaskHandle |
| Helper wrapper to encapsulate the access through the material manager Handles returned from the material manager are only designed to be used (resolved) on the game thread by the physics interface. 更多... | |
| struct | FMultiChildProxyId |
Used with TMultiChildProxyData. 更多... | |
| class | FNarrowPhase |
| Generate contact manifolds for particle pairs. 更多... | |
| class | FParticleData |
| Base class for transient classes used to communicate simulated particle state between game and physics threads, which is managed by proxies. 更多... | |
| class | FParticlePairBroadPhase |
| Run through a list of particle pairs and pass them onto the collision detector if their AABBs overlap. 更多... | |
| class | FParticleUtilities_ActorSpace |
| Particle Space == Actor Space (Transforms) Velocities in CoM Space. 更多... | |
| class | FParticleUtilities_CoMSpace |
| Particle Space == CoM Space. 更多... | |
| class | FPBDCollisionConstraints |
| A container and solver for collision constraints. 更多... | |
| class | FPBDConstraintColor |
| Generates color information for a single constraint rule in a connection graph. 更多... | |
| class | FPBDConstraintContainer |
| Base class for containers of constraints. 更多... | |
| class | FPBDConstraintGraph |
| Build a graph of connected particles, and then a set of independent islands. 更多... | |
| class | FPBDConstraintGraphRule |
| Base class for Constraint Rules that use the Contact Graph (which will be most optimized ones). 更多... | |
| class | FPBDJointConstraints |
| A joint restricting up to 6 degrees of freedom, with linear and angular limits. 更多... | |
| class | FPBDMinEvolution |
| A minimal optimized evolution with support for 更多... | |
| struct | FPBDRigidDirtyParticlesBufferOut |
| Solver specific data buffered for use on Game thread 更多... | |
| struct | FPendingSpatialData |
| Used for updating intermediate spatial structures when they are finished 更多... | |
| class | FPerShapeData |
| Data that is associated with geometry. 更多... | |
| class | FPhysicalMaterialManager |
| Global manager for physical materials. 更多... | |
| class | FPhysicsSceneGuard |
| Recursive Read/Write lock object for protecting external data accesses for physics scenes. 更多... | |
| class | FPhysicsSolverAdvanceTask |
| Task responsible for processing the command buffer of a single solver and advancing it by a specified delta before completing. 更多... | |
| class | FSimpleConstraintRule |
| Constraint rule for evolutions that do not use Constraint Graphs or other acceleration schemes. 更多... | |
| struct | FSimpleWheelConfig |
| Tire load changes, when cornering outer tires are loaded and inner ones unloaded Similarly load changes when accelerating and breaking. 更多... | |
| class | FSimpleWheeledVehicle |
| This class is currently just a container for the simulation components used by a wheeled vehicle Keeping all the physics systems together and accessible through the one vehicle class 更多... | |
| class | FSimpleWheelSim |
| Wheel instance data changes during the simulation 更多... | |
| class | FSimulationSpace |
| Information about the space in which a simulation is being run. 更多... | |
| class | FSimulationSpaceSettings |
| Settings to control how much of world-space movement should get passed into the simulation. 更多... | |
| class | FSingleBuffer |
| Single Buffer Implementation 更多... | |
| class | FSolverEventFilters |
| Container for the Solver Event Filters that have settings exposed through the Solver Actor 更多... | |
| class | FSpatialAccelerationBroadPhase |
| A broad phase that iterates over particle and uses a spatial acceleration structure to output potentially overlapping SpatialAccelerationHandles. 更多... | |
| class | FSpatialAccelerationCache |
| The SOA cache used for a single acceleration structure 更多... | |
| struct | FSpatialAccelerationCacheHandle |
| The handle the acceleration structure uses to access the data (similar to particle handle) 更多... | |
| struct | FSuspensionTrace |
| Suspension world ray/shape trace start and end positions 更多... | |
| class | FSyncCollisionReceiver |
| A synchronous collision receiver. 更多... | |
| class | IEventHandler |
| Interface for event handler 更多... | |
| class | ISpacialDebugDrawInterface |
| Can be implemented by external, non-chaos systems to collect / render debug information from spacial structures. 更多... | |
| class | ISpatialVisitor |
| Visitor base class used to iterate through spatial acceleration structures. 更多... | |
| class | TAccelerationStructureHandle |
| Wrapper that holds both physics thread data and GT data. 更多... | |
| class | TBufferedData |
| Container type for double buffered physics data. 更多... | |
| class | TChaosReadWriteResource |
| Lockable resource for use with chaos data. 更多... | |
| struct | TCollisionData |
| Collision event data stored for use by other systems (e.g. 更多... | |
| struct | TConnectivityEdge |
An entry in a clustered particle's ConnectivityEdges array, indicating a connection between that body and Sibling, with a strength breakable by a Strain threshold. 更多... | |
| class | TConstraintHandleAllocator |
| An allocator for constraint handles. 更多... | |
| class | TContainerConstraintHandle |
| Utility base class for ConstraintHandles. 更多... | |
| class | TDenseMatrix |
| A matrix with run-time variable dimensions, up to an element limit defined at compile-time. 更多... | |
| class | TEventContainer |
| Class that owns the injected producer function and its associated data buffer 更多... | |
| class | TEventContainerBase |
| Interface for the injected producer function and associated data buffer 更多... | |
| class | TGenericParticleHandle |
| A wrapper around any type of particle handle to provide a consistent (read-only) API for all particle types. 更多... | |
| class | TImplicitObjectTransformed |
| Transform the contained shape. 更多... | |
| class | TKinematicTarget |
| Data used to integrate kinematic bodies 更多... | |
| struct | TMultiChildProxyData |
| When multiple children are active and can share one collision proxy. 更多... | |
| class | TParticleRule |
| Apply an effect to all particles. 更多... | |
| class | TPBDConstraintColorRule |
| Level- and Color-based constraint rule. 更多... | |
| class | TPBDConstraintGraphRuleImpl |
| ConstraintGraphRule helper base class - templatized on Constraint Container. 更多... | |
| class | TPBDConstraintIslandRule |
| Island-based constraint rule. 更多... | |
| class | TPerParticlePBDEulerStep |
| Update position and rotation based on velocity and angular velocity. 更多... | |
| class | TPerParticleRule |
| A Particle Rule that applies some effect to all particles in parallel. 更多... | |
| class | TRawEventHandler |
| Instance event handler 更多... | |
| class | TSegmentMesh |
| Mesh structure of connected particles via edges. 更多... | |
| class | TSpatialVisitor |
| Helper class used to bridge virtual to template implementation of acceleration structures 更多... | |
| struct | TSpatialVisitorData |
| A struct which is passed to spatial acceleration visitors whenever there are potential hits. 更多... | |
| class | TThreadCheckedData |
| This is a wrapper around a piece of data which adds execution thread access checks. 更多... | |
| class | TTripleBufferedData |
| A lock free paradigm for sharing data between threads. 更多... | |
类型定义 | |
| typedef IEventHandler * | FEventHandlerPtr |
| Pointer to the event handler | |
| using | FReal = float |
| Common data types for the Chaos physics engine. 更多... | |
| template<typename Traits > | |
| using | TEventContainerBasePtr = TEventContainerBase< Traits > * |
| Pointer to event data buffer & injector functionality | |
枚举 | |
| enum | EChaosCollisionTraceFlag { Chaos_CTF_UseDefault , Chaos_CTF_UseSimpleAndComplex , Chaos_CTF_UseSimpleAsComplex , Chaos_CTF_UseComplexAsSimple , Chaos_CTF_MAX } |
| enum class | ECollisionApplyType |
| What solver method to use for Collision Resolution | |
| enum | EEventType : int32 |
| Predefined System Event Types | |
| enum class | EJointAngularConstraintIndex : int32 |
| The order of the angular constraints (for settings held in vectors etc) | |
| enum class | EKinematicTargetMode { } |
| Controls how a kinematic body is integrated each Evolution Advance 更多... | |
函数 | |
| FORCEINLINE float | Cm2ToM2 (float Cm2) |
| cm squared to meters squared | |
| FORCEINLINE float | CmSToKmH (float CmS) |
| cm/s to km/h | |
| FORCEINLINE float | CmSToMPH (float CmS) |
| cm/s to miles per hour | |
| FORCEINLINE float | CmToM (float Cm) |
| cm to meters | |
| FORCEINLINE float | CmToMiles (float Cm) |
| cm to meters - warning loss of precision | |
| template<typename T , int d, typename FConcrete > | |
| void | GeometryParticleDefaultConstruct (FConcrete &Concrete, const TGeometryParticleParameters< T, d > &Params) |
| Concrete can either be the game thread or physics representation, but API stays the same. 更多... | |
| template<typename T , typename TGeometryA , typename TGeometryB > | |
| bool | GJKDistance (const TGeometryA &A, const TGeometryB &B, const TRigidTransform< T, 3 > &BToATM, T &OutDistance, TVector< T, 3 > &OutNearestA, TVector< T, 3 > &OutNearestB, const T Epsilon=(T) 1e-6, const int32 MaxIts=16) |
| Find the distance and nearest points on two convex geometries A and B. 更多... | |
| template<typename T , typename TGeometryA , typename TGeometryB > | |
| TVector< T, 3 > | GJKDistanceInitialV (const TGeometryA &A, const TGeometryB &B, const TRigidTransform< T, 3 > &BToATM) |
| Used by GJKDistance. 更多... | |
| template<typename T > | |
| TVector< T, 3 > | GJKDistanceInitialV (const TSphere< T, 3 > &A, const TSphere< T, 3 > &B, const TRigidTransform< T, 3 > &BToATM) |
| Used by GJKDistance. 更多... | |
| template<typename T , typename TGeometryA , typename TGeometryB > | |
| bool | GJKIntersection (const TGeometryA &A, const TGeometryB &B, const TRigidTransform< T, 3 > &BToATM, const T InThicknessA=0, const TVector< T, 3 > &InitialDir=TVector< T, 3 >(1, 0, 0), const T InThicknessB=0) |
| Determines if two convex geometries overlap. 更多... | |
| template<typename T , typename TGeometryA , typename TGeometryB > | |
| bool | GJKRaycast (const TGeometryA &A, const TGeometryB &B, const TRigidTransform< T, 3 > &StartTM, const TVector< T, 3 > &RayDir, const T RayLength, T &OutTime, TVector< T, 3 > &OutPosition, TVector< T, 3 > &OutNormal, const T ThicknessA=0, const TVector< T, 3 > &InitialDir=TVector< T, 3 >(1, 0, 0), const T ThicknessB=0) |
| Sweeps one geometry against the other @A The first geometry @B The second geometry @StartTM B's starting configuration in A's local space @RayDir The ray's direction (normalized) @RayLength The ray's length @OutTime The time along the ray when the objects first overlap @OutPosition The first point of impact (in A's local space) when the objects first overlap. 更多... | |
| template<typename T , typename TGeometryA , typename TGeometryB > | |
| bool | GJKRaycast2 (const TGeometryA &A, const TGeometryB &B, const TRigidTransform< T, 3 > &StartTM, const TVector< T, 3 > &RayDir, const T RayLength, T &OutTime, TVector< T, 3 > &OutPosition, TVector< T, 3 > &OutNormal, const T GivenThicknessA=0, bool bComputeMTD=false, const TVector< T, 3 > &InitialDir=TVector< T, 3 >(1, 0, 0), const T GivenThicknessB=0) |
| Sweeps one geometry against the other @A The first geometry @B The second geometry @StartTM B's starting configuration in A's local space @RayDir The ray's direction (normalized) @RayLength The ray's length @OutTime The time along the ray when the objects first overlap @OutPosition The first point of impact (in A's local space) when the objects first overlap. 更多... | |
| FORCEINLINE float | KmHToCmS (float KmH) |
| km/h to cm/s | |
| FORCEINLINE float | KmToMile (float Km) |
| Km to miles | |
| FORCEINLINE float | M2ToCm2 (float M2) |
| meters squared to cm squared | |
| FORCEINLINE float | MileToKm (float Miles) |
| miles to Km | |
| FORCEINLINE float | MPHToCmS (float MPH) |
| miles per hour to cm/s | |
| FORCEINLINE float | MPHToMS (float MPH) |
| miles per hour to meters per second | |
| FORCEINLINE float | MSToMPH (float MS) |
| meters per second to miles per hour | |
| FORCEINLINE float | MToCm (float M) |
| meters to cm | |
| FORCEINLINE float | OmegaToRPM (float Omega) |
| radians per second to revolutions per minute | |
| FORCEINLINE float | RPMToOmega (float RPM) |
| revolutions per minute to radians per second | |
| template<class T , class U > | |
| bool | SaveLoadUtility (U &ObjectToSave, TCHAR const *SerializedBinaryDirectory, TCHAR const *BinaryFolderName, bool bSave, TArray< U > &ObjectsToTest) |
| Serializes and loads ObjectToSave to memory and to disk, returning loaded versions in array for testing. 更多... | |
变量 | |
| static const FString | ChaosVersionString = TEXT("0551E40C75454298898AE1428CF7005A") |
| Core version string for Chaos data. 更多... | |
#todo: -proper suspension setup for resting position - decide on parameters i.e.
Typical gear ratios: Reverse −4.181, 1st 3.818, 2nd 2.294, 3rd 1.500, 4th 1.133, 5th 0.911 Source: Georg Rill.
#todo: Not really making use of this yet.
use SuspensionMaxRaise/SuspensionMaxDrop?? -natural frequency stuff -defaults
Tire nuances more advanced than current simulation which just requires one friction value
Road Vehicle Dynamics: Fundamentals and Modeling (Ground Vehicle Engineering Series) (p. 121). CRC Press.
#todo: Add clutch option #todo: Proper defaults
| using Chaos::FReal = typedef float |
Common data types for the Chaos physics engine.
Unless a specific precision of type is required most code should use these existing types (e.g. FVec3) to adapt to global changes in precision.
|
strong |
Controls how a kinematic body is integrated each Evolution Advance
| void Chaos::GeometryParticleDefaultConstruct | ( | FConcrete & | Concrete, |
| const TGeometryParticleParameters< T, d > & | Params | ||
| ) |
Concrete can either be the game thread or physics representation, but API stays the same.
Useful for keeping initialization and other logic the same
| bool Chaos::GJKDistance | ( | const TGeometryA & | A, |
| const TGeometryB & | B, | ||
| const TRigidTransform< T, 3 > & | BToATM, | ||
| T & | OutDistance, | ||
| TVector< T, 3 > & | OutNearestA, | ||
| TVector< T, 3 > & | OutNearestB, | ||
| const T | Epsilon = (T)1e-6, |
||
| const int32 | MaxIts = 16 |
||
| ) |
Find the distance and nearest points on two convex geometries A and B.
All calculations are performed in the local-space of object A, and the transform from B-space to A-space must be provided. For algorithm see "A Fast and Robust GJK Implementation for Collision Detection of Convex Objects", Gino Van Deb Bergen, 1999.
| A | The first object. |
| B | The second object. |
| BToATM | A transform taking vectors in B-space to A-space |
| B | The second object. |
| OutDistance | if returns true, the minimum distance between A and B, otherwise not modified. |
| OutNearestA | if returns true, the near point on A in local-space, otherwise not modified. |
| OutNearestB | if returns true, the near point on B in local-space, otherwise not modified. |
| Epsilon | The algorithm terminates when the iterative distance reduction gets below this threshold. |
| MaxIts | A limit on the number of iterations. Results may be approximate if this is too low. |
| TVector< T, 3 > Chaos::GJKDistanceInitialV | ( | const TGeometryA & | A, |
| const TGeometryB & | B, | ||
| const TRigidTransform< T, 3 > & | BToATM | ||
| ) |
Used by GJKDistance.
It must return a vector in the Minkowski sum A - B. In principle this can be the vector of any point in A to any point in B, but some choices will cause GJK to minimize faster (e.g., for two spheres, we can easily calculate the actual separating vector and GJK will converge immediately).
| TVector< T, 3 > Chaos::GJKDistanceInitialV | ( | const TSphere< T, 3 > & | A, |
| const TSphere< T, 3 > & | B, | ||
| const TRigidTransform< T, 3 > & | BToATM | ||
| ) |
Used by GJKDistance.
Specialization for sphere-sphere gives correct result immediately.
| bool Chaos::GJKIntersection | ( | const TGeometryA & | A, |
| const TGeometryB & | B, | ||
| const TRigidTransform< T, 3 > & | BToATM, | ||
| const T | InThicknessA = 0, |
||
| const TVector< T, 3 > & | InitialDir = TVector<T, 3>(1, 0, 0), |
||
| const T | InThicknessB = 0 |
||
| ) |
Determines if two convex geometries overlap.
@A The first geometry @B The second geometry @BToATM The transform of B in A's local space @ThicknessA The amount of geometry inflation for Geometry A(for example if the surface distance of two geometries with thickness 0 would be 2, a thickness of 0.5 would give a distance of 1.5) @InitialDir The first direction we use to search the CSO @ThicknessB The amount of geometry inflation for Geometry B(for example if the surface distance of two geometries with thickness 0 would be 2, a thickness of 0.5 would give a distance of 1.5)
| bool Chaos::GJKRaycast | ( | const TGeometryA & | A, |
| const TGeometryB & | B, | ||
| const TRigidTransform< T, 3 > & | StartTM, | ||
| const TVector< T, 3 > & | RayDir, | ||
| const T | RayLength, | ||
| T & | OutTime, | ||
| TVector< T, 3 > & | OutPosition, | ||
| TVector< T, 3 > & | OutNormal, | ||
| const T | ThicknessA = 0, |
||
| const TVector< T, 3 > & | InitialDir = TVector<T, 3>(1, 0, 0), |
||
| const T | ThicknessB = 0 |
||
| ) |
Sweeps one geometry against the other @A The first geometry @B The second geometry @StartTM B's starting configuration in A's local space @RayDir The ray's direction (normalized) @RayLength The ray's length @OutTime The time along the ray when the objects first overlap @OutPosition The first point of impact (in A's local space) when the objects first overlap.
Invalid if time of impact is 0 @OutNormal The impact normal (in A's local space) when the objects first overlap. Invalid if time of impact is 0 @ThicknessA The amount of geometry inflation for Geometry A (for example if the surface distance of two geometries with thickness 0 would be 2, a thickness of 0.5 would give a distance of 1.5) @InitialDir The first direction we use to search the CSO @ThicknessB The amount of geometry inflation for Geometry B (for example if the surface distance of two geometries with thickness 0 would be 2, a thickness of 0.5 would give a distance of 1.5)
| bool Chaos::GJKRaycast2 | ( | const TGeometryA & | A, |
| const TGeometryB & | B, | ||
| const TRigidTransform< T, 3 > & | StartTM, | ||
| const TVector< T, 3 > & | RayDir, | ||
| const T | RayLength, | ||
| T & | OutTime, | ||
| TVector< T, 3 > & | OutPosition, | ||
| TVector< T, 3 > & | OutNormal, | ||
| const T | GivenThicknessA = 0, |
||
| bool | bComputeMTD = false, |
||
| const TVector< T, 3 > & | InitialDir = TVector<T, 3>(1, 0, 0), |
||
| const T | GivenThicknessB = 0 |
||
| ) |
Sweeps one geometry against the other @A The first geometry @B The second geometry @StartTM B's starting configuration in A's local space @RayDir The ray's direction (normalized) @RayLength The ray's length @OutTime The time along the ray when the objects first overlap @OutPosition The first point of impact (in A's local space) when the objects first overlap.
Invalid if time of impact is 0 @OutNormal The impact normal (in A's local space) when the objects first overlap. Invalid if time of impact is 0 @ThicknessA The amount of geometry inflation for Geometry A (for example a capsule with radius 5 could pass in its core segnment and a thickness of 5) @InitialDir The first direction we use to search the CSO @ThicknessB The amount of geometry inflation for Geometry B (for example a sphere with radius 5 could pass in its center point and a thickness of 5)
| bool Chaos::SaveLoadUtility | ( | U & | ObjectToSave, |
| TCHAR const * | SerializedBinaryDirectory, | ||
| TCHAR const * | BinaryFolderName, | ||
| bool | bSave, | ||
| TArray< U > & | ObjectsToTest | ||
| ) |
Serializes and loads ObjectToSave to memory and to disk, returning loaded versions in array for testing.
also loads and returns all binaries in test's subdirectory in SerializedBinaryDirectory. Used to test backwards compatibility for previous serialization formats.
| ObjectToSave | - Data being tested. Will be saved and loaded, loaded copies returned for testing. |
| SerializedBinaryDirectory | - Path to directory containing subfolders containing binaries to load for testing. |
| BinaryFolderName | - Name of folder in SerializedBinarYDirectory for this test. Should not match name of other tests. |
| bSave | - If true, ObjectToSave will be saved to SerialziedBinarY folder for testing in future. Should be false, temporarily flip to true to save. |
| ObjectsToTest | - Returned Objects that were deserialized. |