IClothingSimulation

Base class for clothing simulators.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

ClothingSystemRuntimeInterface

Header

/Engine/Source/Runtime/ClothingSystemRuntimeInterface/Public/ClothingSimulationInterface.h

Include

#include "ClothingSimulationInterface.h"

Syntax

class IClothingSimulation

Remarks

Base class for clothing simulators.

Constructors

Name Description

Public function

IClothingSimulation()

Destructors

Name Description

Public function Virtual

~IClothingSimulation()

Functions

Name Description

Protected function

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

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

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

IClothingSim ...

 

CreateContext()

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

Protected function

void

 

DestroyActors()

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

Protected function

void

 

DestroyContext

(
    IClothingSimulationContext * In...
)

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

Protected function

void

 

FillContext

(
    USkeletalMeshComponent * InComp...,
    float InDeltaTime,
    IClothingSimulationContext * In...
)

Fills an existing context for a single simulation step, called by the engine on the game thread prior to simulation

Public function Virtual Const

void

 

GatherStats()

Called by the engine once per physics tick to gather non-cycle stats (num sim verts etc.) Will not be called if STATS is not defined, not required to be implemented if no need for stats.

Protected function Const

FBoxSphereBo ...

 

GetBounds

(
    const USkeletalMeshComponent * ...
)

Get the bounds of the simulation mesh in local simulation space

Protected function Const

void

 

GetCollisions

(
    FClothCollisionData & OutCollisions,
    bool bIncludeExternal
)

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

Protected function Const

void

 

GetSimulationData

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

Fill FClothSimulData map for the clothing simulation.

Protected function

void

 

Initialize()

Initialize the simulation, will be called before any Simulate calls

Protected function

void

 

PostActorCreationInitialize()

Do any required initialization after all the actors have been loaded

Protected function 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

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

void

 

Simulate

(
    IClothingSimulationContext * In...
)

Run a single tick of the simulation.

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback