ClothingSimulation

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

ChaosCloth

Header

/Engine/Plugins/Experimental/ChaosCloth/Source/Chaos/Public/ChaosCloth/ChaosClothingSimulation.h

Include

#include "ChaosCloth/ChaosClothingSimulation.h"

Syntax

class ClothingSimulation :
    public FClothingSimulationCommon,
    public FGCObject

Constructors

Name Description

Public function

ClothingSimulation()

Destructors

Name Description

Public function Virtual

~ClothingSimulation()

Functions

Name Description

Public function Const

void

 

DebugDrawAnimDrive

(
    USkeletalMeshComponent* OwnerC...,
    FPrimitiveDrawInterface* PDI
)

Public function Const

void

 

DebugDrawBackstops

(
    USkeletalMeshComponent* OwnerC...,
    FPrimitiveDrawInterface* PDI
)

Public function Const

void

 

DebugDrawCollision

(
    USkeletalMeshComponent* OwnerC...,
    FPrimitiveDrawInterface* PDI
)

Public function Const

void

 

DebugDrawFaceNormals

(
    USkeletalMeshComponent* OwnerC...,
    FPrimitiveDrawInterface* PDI
)

Public function Const

void

 

DebugDrawInversedFaceNormals

(
    USkeletalMeshComponent* OwnerC...,
    FPrimitiveDrawInterface* PDI
)

Public function Const

void

 

DebugDrawInversedPointNormals

(
    USkeletalMeshComponent* OwnerC...,
    FPrimitiveDrawInterface* PDI
)

Public function Const

void

 

DebugDrawLocalSpace

(
    USkeletalMeshComponent* OwnerC...,
    FPrimitiveDrawInterface* PDI
)

Public function Const

void

 

DebugDrawLongRangeConstraint

(
    USkeletalMeshComponent* OwnerC...,
    FPrimitiveDrawInterface* PDI
)

Public function Const

void

 

DebugDrawMaxDistances

(
    USkeletalMeshComponent* OwnerC...,
    FPrimitiveDrawInterface* PDI
)

Public function Const

void

 

DebugDrawPhysMeshShaded

(
    USkeletalMeshComponent* OwnerC...,
    FPrimitiveDrawInterface* PDI
)

Editor only debug draw function.

Public function Const

void

 

DebugDrawPhysMeshWired

(
    USkeletalMeshComponent* OwnerC...,
    FPrimitiveDrawInterface* PDI
)

Editor & runtime debug draw functions.

Public function Const

void

 

DebugDrawPointNormals

(
    USkeletalMeshComponent* OwnerC...,
    FPrimitiveDrawInterface* PDI
)

Public function Const

void

 

DebugDrawWindDragForces

(
    USkeletalMeshComponent* OwnerC...,
    FPrimitiveDrawInterface* PDI
)

Public function

void

 

DisableGravityOverride()

Public function

void

 

RefreshClothConfig()

Function to be called if any of the assets' configuration parameters have changed.

Public function

void

 

RefreshPhysicsAsset()

Function to be called if any of the assets' physics assets changes (colliders) This seems to only happen when UPhysicsAsset::RefreshPhysicsAssetChange is called with bFullClothRefresh set to false during changes created using the viewport manipulators.

Public function

void

 

SetAnimDriveSpringStiffness

(
    float InStiffness
)

Set the animation drive stiffness for all actors.

Public function

void

 

SetGravityOverride

(
    const FVector& InGravityOverride
)

Overridden from IClothingSimulation

Name Description

Protected function Virtual

void

 

AddExternalCollisions

(
    const FClothCollisionData& InData
)

Called by the engine when an external object wants to inject collision data into this simulation above and beyond what is specified in the asset for the internal actors Examples: Scene collision, collision for parents we are attached to

Protected function Virtual

void

 

ClearExternalCollisions()

Called by the engine when external collisions are no longer necessary or when they need to be updated with some of the previous collisions removed.

Protected function Virtual

void

 

CreateActor

(
    USkeletalMeshComponent* InOwne...,
    UClothingAssetBase* InAsset,
    int32 SimDataIndex
)

Create an actor for this simulation from the data in InAsset Simulation data for this actor should be written back to SimDataIndex in GetSimulationData

Protected function Virtual

IClothingSim...

 

CreateContext()

Create a new context, will not be filled, call FillContext before simulating with this context

Protected function Virtual

void

 

DestroyActors()

Simulation should remove all of it's actors when next possible and free them

Protected function Virtual

void

 

DestroyContext

(
    IClothingSimulationContext* In...
)

Destroy a context object, engine will always pass a context created using CreateContext

Protected function Virtual Const

FBoxSphereBo...

 

GetBounds

(
    const USkeletalMeshComponent* ...
)

Return bounds in local space (or in world space if InOwnerComponent is null).

Protected function Virtual Const

void

 

GetCollisions

(
    FClothCollisionData& OutCollisions,
    bool bIncludeExternal
)

Called by the engine to request data on all active collisions in a simulation.

Protected function Virtual Const

void

 

GetSimulationData

(
    TMap< int32, FClothSimulData >& Ou...,
    USkeletalMeshComponent* InOwne...,
    USkinnedMeshComponent* InOverr...
)

Fill FClothSimulData map for the clothing simulation.

Protected function Virtual

void

 

Initialize()

Initialize the simulation, will be called before any Simulate calls

Protected function Virtual

void

 

PostActorCreationInitialize()

Do any required initialization after all the actors have been loaded

Protected function Virtual Const

bool

 

ShouldSimulate()

Called by the engine to detect whether or not the simulation should run, essentially are there any actors that need to simulate in this simulation

Protected function Virtual

void

 

Shutdown()

Shutdown the simulation, this should clear ALL resources as we no longer expect to call any other function on this simulation without first calling Initialize again.

Protected function Virtual

void

 

Simulate

(
    IClothingSimulationContext* In...
)

Run a single tick of the simulation.

Overridden from FGCObject

Name Description

Public function Virtual

void

 

AddReferencedObjects

(
    FReferenceCollector& Collector
)

Pure virtual that must be overloaded by the inheriting class.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss