UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
PBDSelfCollisionSphereConstraints.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3
4#if !COMPILE_WITHOUT_UNREAL_SUPPORT
5#include "Chaos/Core.h"
10#include "Containers/Set.h"
11
12namespace Chaos::Softs
13{
15 {
16 public:
18 const int32 InOffset,
24
26
27 template<typename SolverParticlesOrRange>
28 CHAOS_API void Init(const SolverParticlesOrRange& Particles);
29
30 template<typename SolverParticlesOrRange>
32
34 const TSet<int32>* GetVertexSet() const { return VertexSetNoOffset; }
35 FSolverReal GetRadius() const { return Radius; }
36
37 protected:
42
43 private:
44 int32 Offset;
45 int32 NumParticles;
46 const TArray<FSolverVec3>* ReferencePositions;
47 };
48
50 {
52
53 public:
58
73
76 const TMap<FString, const TSet<int32>*>& VertexSets);
77
78 UE_CHAOS_DECLARE_INDEXLESS_PROPERTYCOLLECTION_NAME(SelfCollisionSphereSetName, bool); // Selection set name string property, the bool value is not actually used
81
82 private:
83 using Base::Radius;
84 using Base::Stiffness;
86
89 };
90}
91#endif
#define UE_CHAOS_DECLARE_INDEXED_PROPERTYCOLLECTION_NAME(PropertyName, Type)
Definition CollectionPropertyFacade.h:893
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
Definition CollectionPropertyFacade.h:49
Definition PBDSelfCollisionSphereConstraints.h:15
const TSet< int32 > * GetVertexSet() const
Definition PBDSelfCollisionSphereConstraints.h:34
FSolverReal Radius
Definition PBDSelfCollisionSphereConstraints.h:39
TArray< TVec2< int32 > > Constraints
Definition PBDSelfCollisionSphereConstraints.h:38
virtual ~FPBDSelfCollisionSphereConstraintsBase()
Definition PBDSelfCollisionSphereConstraints.h:25
FSolverReal Stiffness
Definition PBDSelfCollisionSphereConstraints.h:40
const TSet< int32 > * VertexSetNoOffset
Definition PBDSelfCollisionSphereConstraints.h:41
CHAOS_API void Init(const SolverParticlesOrRange &Particles)
const TArray< TVec2< int32 > > & GetConstraints() const
Definition PBDSelfCollisionSphereConstraints.h:33
CHAOS_API void Apply(SolverParticlesOrRange &InParticles, const FSolverReal Dt) const
FSolverReal GetRadius() const
Definition PBDSelfCollisionSphereConstraints.h:35
Definition PBDSelfCollisionSphereConstraints.h:50
UE_CHAOS_DECLARE_INDEXLESS_PROPERTYCOLLECTION_NAME(SelfCollisionSphereRadius, float)
UE_CHAOS_DECLARE_INDEXLESS_PROPERTYCOLLECTION_NAME(SelfCollisionSphereSetName, bool)
UE_CHAOS_DECLARE_INDEXLESS_PROPERTYCOLLECTION_NAME(SelfCollisionSphereStiffness, float)
static bool IsEnabled(const FCollectionPropertyConstFacade &PropertyCollection)
Definition PBDSelfCollisionSphereConstraints.h:54
CHAOS_API void SetProperties(const FCollectionPropertyConstFacade &PropertyCollection, const TMap< FString, const TSet< int32 > * > &VertexSets)
Definition PBDSelfCollisionSphereConstraints.cpp:146
FPBDSelfCollisionSphereConstraints(const int32 InOffset, const int32 InNumParticles, const TMap< FString, const TSet< int32 > * > &VertexSets, const FCollectionPropertyConstFacade &PropertyCollection)
Definition PBDSelfCollisionSphereConstraints.h:59
Definition Array.h:670
Definition UnrealString.h.inl:34
Definition CollectionEmbeddedSpringConstraintFacade.cpp:6
FRealSingle FSolverReal
Definition PBDSoftsEvolutionFwd.h:31
Definition UnrealMathUtility.h:270